diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-06-10 18:01:07 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-06-18 11:10:07 +0200 |
commit | 799205488cf82312586f99185e13df6015caa2ff (patch) | |
tree | d8c6172b48d8cdabb16ef8b535a21c96b1ebc739 /lib/private/route | |
parent | baf46c74cda834bbdb4ecf4669587b92b56fe9a9 (diff) | |
download | nextcloud-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.php | 4 |
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(); |