diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/update.php | 10 | ||||
-rw-r--r-- | core/templates/update.use-cli.php | 14 |
2 files changed, 23 insertions, 1 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index d4f54f8a0f2..4bc1f4faa45 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -37,9 +37,17 @@ $eventSource = \OC::$server->createEventSource(); // need to send an initial message to force-init the event source, // which will then trigger its own CSRF check and produces its own CSRF error // message -$eventSource->send('success', (string)$l->t('Preparing update')); +//$eventSource->send('success', (string)$l->t('Preparing update')); if (OC::checkUpgrade(false)) { + + $config = \OC::$server->getSystemConfig(); + if ($config->getValue('upgrade.disable-web', true)) { + $eventSource->send('failure', (string)$l->t('Updates need to be installed. Please use the command line updater.')); + $eventSource->close(); + exit(); + } + // if a user is currently logged in, their session must be ignored to // avoid side effects \OC_User::setIncognitoMode(true); diff --git a/core/templates/update.use-cli.php b/core/templates/update.use-cli.php new file mode 100644 index 00000000000..52d40cdea55 --- /dev/null +++ b/core/templates/update.use-cli.php @@ -0,0 +1,14 @@ +<div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>"> + <div class="updateOverview"> + <h2 class="title"><?php p($l->t('Update needed')) ?></h2> + <div class="infogroup"> + <?php if ($_['tooBig']) { + p($l->t('Please use the command line updater because you have a big instance.')); + } else { + p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.')); + } ?><br><br> + <?php + print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer" href="%s">documentation</a>.', [link_to_docs('admin-cli-upgrade')])); ?><br><br> + </div> + </div> +</div> |