diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-07-24 18:30:33 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-07-24 18:30:33 +0200 |
commit | 63ffae83738b51d3e851c9dd1bbbb5e93244b27b (patch) | |
tree | 1771b6542c58ec7e73614a89347869e9abacd8c1 | |
parent | 788a2eca2f606eead30a398f0c6d911d7928de31 (diff) | |
parent | 2b1cd84fcc164ed3f6f33d53af0d72f42be73056 (diff) | |
download | nextcloud-server-63ffae83738b51d3e851c9dd1bbbb5e93244b27b.tar.gz nextcloud-server-63ffae83738b51d3e851c9dd1bbbb5e93244b27b.zip |
Merge pull request #9861 from owncloud/console-dontloadappsonupdate
Do not load apps in console.php when an upgrade is due
-rw-r--r-- | console.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/console.php b/console.php index 55bae7a6b38..4b0adae539e 100644 --- a/console.php +++ b/console.php @@ -22,16 +22,22 @@ try { exit(0); } - // load all apps to get all api routes properly setup - OC_App::loadApps(); + // only load apps if no update is due, + // else only core commands will be available + if (!\OCP\Util::needUpgrade()) { + // load all apps to get all api routes properly setup + OC_App::loadApps(); + } $defaults = new OC_Defaults; $application = new Application($defaults->getName(), \OC_Util::getVersionString()); require_once 'core/register_command.php'; - foreach(OC_App::getAllApps() as $app) { - $file = OC_App::getAppPath($app).'/appinfo/register_command.php'; - if(file_exists($file)) { - require $file; + if (!\OCP\Util::needUpgrade()) { + foreach(OC_App::getAllApps() as $app) { + $file = OC_App::getAppPath($app).'/appinfo/register_command.php'; + if(file_exists($file)) { + require $file; + } } } $application->run(); |