summaryrefslogtreecommitdiffstats
path: root/lib/private/route
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-10 18:01:07 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-18 11:10:07 +0200
commit799205488cf82312586f99185e13df6015caa2ff (patch)
treed8c6172b48d8cdabb16ef8b535a21c96b1ebc739 /lib/private/route
parentbaf46c74cda834bbdb4ecf4669587b92b56fe9a9 (diff)
downloadnextcloud-server-799205488cf82312586f99185e13df6015caa2ff.tar.gz
nextcloud-server-799205488cf82312586f99185e13df6015caa2ff.zip
Prevent loadApps on upgrade
Moved OC::needUpgrade() to OCP\Util::needUpgrade() to make it accessible form the router. Moved maintenance + upgrade check to the router.
Diffstat (limited to 'lib/private/route')
-rw-r--r--lib/private/route/router.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index e7c8ad9ebdd..f3a4bc5f3e4 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -192,7 +192,9 @@ class Router implements IRouter {
$this->loadRoutes($app);
} else if (substr($url, 0, 6) === '/core/' or substr($url, 0, 10) === '/settings/') {
\OC::$REQUESTEDAPP = $url;
- \OC_App::loadApps();
+ if (!\OC_Config::getValue('maintenance', false) && !\OCP\Util::needUpgrade()) {
+ \OC_App::loadApps();
+ }
$this->loadRoutes('core');
} else {
$this->loadRoutes();