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

David Prévot taffit at moszumanska.debian.org
Thu Dec 17 19:40:36 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit 5755d16b6ec80b20f18ea7710401825779c86b98
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 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/private/console/application.php b/lib/private/console/application.php
index e7ddeed..f6bb2c0 100644
--- a/lib/private/console/application.php
+++ b/lib/private/console/application.php
@@ -53,7 +53,12 @@ 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");
+				$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);
@@ -63,8 +68,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