[Pkg-owncloud-commits] [owncloud] 55/86: Don't load commands of apps when in maintenance mode - fixes #20939

David Prévot taffit at moszumanska.debian.org
Tue Dec 22 16:52:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.1.5
in repository owncloud.

commit af67c456acb72b36ba9f1adba68a114d6591a223
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Wed Dec 9 15:15:10 2015 +0100

    Don't load commands of apps when in maintenance mode - fixes #20939
---
 lib/private/console/application.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/private/console/application.php b/lib/private/console/application.php
index 7c70992..a6cbe20 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");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list