Revert "Bypass upgrade page when occ controller is requested"
This reverts commit 89e581acf8
.
This commit is contained in:
parent
ba16fd0d33
commit
e3b509220b
18
lib/base.php
18
lib/base.php
|
@ -833,14 +833,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
|
||||
|
@ -858,16 +854,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)
|
||||
|
|
Loading…
Reference in New Issue