Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ public static function checkMaintenanceMode(\OC\SystemConfig $systemConfig): voi
private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
$cliUpgradeLink = $systemConfig->getValue('upgrade.cli-upgrade-link', '');
$disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
$redirectUpgradePage = $systemConfig->getValue('upgrade.redirect_upgradepage_to_location', null);

$tooBig = false;
if (!$disableWebUpdater) {
$apps = Server::get(\OCP\App\IAppManager::class);
Expand Down Expand Up @@ -292,6 +294,13 @@ private static function printUpgradePage(\OC\SystemConfig $systemConfig): void {
$ignoreTooBigWarning = isset($_GET['IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup']) &&
$_GET['IKnowThatThisIsABigInstanceAndTheUpdateRequestCouldRunIntoATimeoutAndHowToRestoreABackup'] === 'IAmSuperSureToDoThis';

if ($redirectUpgradePage !== null) {
http_response_code(302);
header('X-Nextcloud-needsDbUpgrade: 1');
header("Location: ${redirectUpgradePage}#" . time());
die();
}

if ($disableWebUpdater || ($tooBig && !$ignoreTooBigWarning)) {
// send http status 503
http_response_code(503);
Expand Down
Loading