Revert "Bypass upgrade page when occ controller is requested (#25363)"
This reverts commit 445a76bb1b
.
This commit is contained in:
parent
06964b32f3
commit
4782b92347
18
lib/base.php
18
lib/base.php
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue