Revert "Bypass upgrade page when occ controller is requested (#25363)"

This reverts commit 445a76bb1b.
This commit is contained in:
Morris Jobke 2016-07-07 12:07:35 +02:00
parent 06964b32f3
commit 4782b92347
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 3 additions and 15 deletions

View File

@ -932,14 +932,10 @@ class OC {
}
$request = \OC::$server->getRequest();
// Check if requested URL matches 'index.php/occ'
$isOccControllerRequested = preg_match('|/index\.php$|', $request->getScriptName()) === 1
&& strpos($request->getPathInfo(), '/occ/') === 0;
$requestPath = $request->getRawPathInfo();
if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade
self::checkMaintenanceMode($request);
$needUpgrade = self::checkUpgrade(!$isOccControllerRequested);
self::checkUpgrade();
}
// emergency app disabling
@ -957,16 +953,8 @@ class OC {
exit();
}
try {
// Always load authentication apps
OC_App::loadApps(['authentication']);
} catch (\OC\NeedsUpdateException $e) {
if ($isOccControllerRequested && $needUpgrade){
OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo());
return;
}
throw $e;
}
// Always load authentication apps
OC_App::loadApps(['authentication']);
// Load minimum set of apps
if (!self::checkUpgrade(false)