diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-07 12:14:45 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-07-07 12:14:45 +0200 |
commit | 2791b8f00dec7136280e53175285de04f6c8f092 (patch) | |
tree | 9856834214b634a1177ded5b94f46d5a65d1e85d /lib/base.php | |
parent | e3b509220b5e90646b54490fa081fa53880089e5 (diff) | |
download | nextcloud-server-2791b8f00dec7136280e53175285de04f6c8f092.tar.gz nextcloud-server-2791b8f00dec7136280e53175285de04f6c8f092.zip |
Revert "occ web executor (#24957)"
This reverts commit 854352d9a064a1e469ede207493bce44fd41d96c.
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/base.php b/lib/base.php index dde8e38218a..70fac6d707b 100644 --- a/lib/base.php +++ b/lib/base.php @@ -49,8 +49,6 @@ * */ -use OCP\IRequest; - require_once 'public/Constants.php'; /** @@ -273,20 +271,9 @@ class OC { } } - /** - * Limit maintenance mode access - * @param IRequest $request - */ - public static function checkMaintenanceMode(IRequest $request) { - // Check if requested URL matches 'index.php/occ' - $isOccControllerRequested = preg_match('|/index\.php$|', $request->getScriptName()) === 1 - && strpos($request->getPathInfo(), '/occ/') === 0; + public static function checkMaintenanceMode() { // Allow ajax update script to execute without being stopped - if ( - \OC::$server->getSystemConfig()->getValue('maintenance', false) - && OC::$SUBURI != '/core/ajax/update.php' - && !$isOccControllerRequested - ) { + if (\OC::$server->getSystemConfig()->getValue('maintenance', false) && OC::$SUBURI != '/core/ajax/update.php') { // send http status 503 header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); @@ -835,7 +822,7 @@ class OC { $request = \OC::$server->getRequest(); $requestPath = $request->getRawPathInfo(); if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade - self::checkMaintenanceMode($request); + self::checkMaintenanceMode(); self::checkUpgrade(); } |