diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-12-09 19:57:33 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-12-09 19:57:33 +0100 |
commit | c132f91f9dd0881f3cc44f8d50dbf6a883d1b576 (patch) | |
tree | 1f7b77d326620a6185759eb61181c4b1f299fea4 | |
parent | 873e932f59c3fa3d2ab8bca083abea5ba44afcee (diff) | |
parent | af67c456acb72b36ba9f1adba68a114d6591a223 (diff) | |
download | nextcloud-server-c132f91f9dd0881f3cc44f8d50dbf6a883d1b576.tar.gz nextcloud-server-c132f91f9dd0881f3cc44f8d50dbf6a883d1b576.zip |
Merge pull request #21085 from owncloud/occ-shall-not-fail-hard-in-maintenance-mode-stable8.1
Don't load commands of apps when in maintenance mode
-rw-r--r-- | lib/private/console/application.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/console/application.php b/lib/private/console/application.php index 7c709927219..a6cbe207a3b 100644 --- a/lib/private/console/application.php +++ b/lib/private/console/application.php @@ -52,7 +52,11 @@ class Application { $application = $this->application; require_once \OC::$SERVERROOT . '/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"); + } 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) { $file = OC_App::getAppPath($app) . '/appinfo/register_command.php'; @@ -60,8 +64,6 @@ class Application { require $file; } } - } else { - $output->writeln("ownCloud or one of the apps require upgrade - only a limited number of commands are available"); } } else { $output->writeln("ownCloud is not installed - only a limited number of commands are available"); |