diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-09 15:15:10 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-09 15:15:10 +0100 |
commit | d5238b3d3cbac01e3660a5e3250deccc87c59d7d (patch) | |
tree | 7b96ade539680ce812f52b58e06cbbf244cc355b /lib/private/console | |
parent | 04f4565fcda4c7482c25681863237d05e850562a (diff) | |
download | nextcloud-server-d5238b3d3cbac01e3660a5e3250deccc87c59d7d.tar.gz nextcloud-server-d5238b3d3cbac01e3660a5e3250deccc87c59d7d.zip |
Don't load commands of apps when in maintenance mode - fixes #20939
Diffstat (limited to 'lib/private/console')
-rw-r--r-- | lib/private/console/application.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/console/application.php b/lib/private/console/application.php index c46e6d60de2..e6d8677b72e 100644 --- a/lib/private/console/application.php +++ b/lib/private/console/application.php @@ -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"); |