summaryrefslogtreecommitdiffstats
path: root/core/ajax/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/ajax/update.php')
-rw-r--r--core/ajax/update.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 631a8a7871c..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);
@@ -47,7 +55,6 @@ if (OC::checkUpgrade(false)) {
$logger = \OC::$server->getLogger();
$config = \OC::$server->getConfig();
$updater = new \OC\Updater(
- \OC::$server->getHTTPHelper(),
$config,
\OC::$server->getIntegrityCodeChecker(),
$logger