Merge pull request #8114 from nextcloud/settings-initalization-fix

Only initialize settings application if the instance is installed
This commit is contained in:
Roeland Jago Douma 2018-01-30 22:28:10 +01:00 committed by GitHub
commit ad5595c5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -723,8 +723,11 @@ class OC {
self::registerAccountHooks(); self::registerAccountHooks();
self::registerSettingsHooks(); self::registerSettingsHooks();
// Make sure that the application class is not loaded before the database is setup
if ($systemConfig->getValue("installed", false)) {
$settings = new \OC\Settings\Application(); $settings = new \OC\Settings\Application();
$settings->register(); $settings->register();
}
//make sure temporary files are cleaned up //make sure temporary files are cleaned up
$tmpManager = \OC::$server->getTempManager(); $tmpManager = \OC::$server->getTempManager();