Don't load commands of apps when in maintenance mode - fixes #20939
This commit is contained in:
parent
04f4565fcd
commit
d5238b3d3c
|
@ -55,7 +55,12 @@ class Application {
|
|||
$application = $this->application;
|
||||
require_once __DIR__ . '/../../../core/register_command.php';
|
||||
if ($this->config->getSystemValue('installed', false)) {
|
||||
if (!\OCP\Util::needUpgrade()) {
|
||||
if (\OCP\Util::needUpgrade()) {
|
||||
$output->writeln("ownCloud or one of the apps require upgrade - only a limited number of commands are available");
|
||||
$output->writeln("You may use your browser or the occ upgrade command to do the upgrade");
|
||||
} elseif ($this->config->getSystemValue('maintenance', false)) {
|
||||
$output->writeln("ownCloud is in maintenance mode - no app have been loaded");
|
||||
} else {
|
||||
OC_App::loadApps();
|
||||
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
|
||||
$appPath = \OC_App::getAppPath($app);
|
||||
|
@ -68,9 +73,6 @@ class Application {
|
|||
require $file;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$output->writeln("ownCloud or one of the apps require upgrade - only a limited number of commands are available");
|
||||
$output->writeln("You may use your browser or the occ upgrade command to do the upgrade");
|
||||
}
|
||||
} else {
|
||||
$output->writeln("ownCloud is not installed - only a limited number of commands are available");
|
||||
|
|
Loading…
Reference in New Issue