summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/ajax/update.php3
-rw-r--r--lib/base.php4
2 files changed, 3 insertions, 4 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 6015a901eb7..9d0c6f89f1b 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -5,6 +5,8 @@ require_once '../../lib/base.php';
if (OC::checkUpgrade(false)) {
\OC_DB::enableCaching(false);
+ OC_Config::setValue('maintenance', true);
+ OC_Log::write('core', 'starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, OC_Log::WARN);
$updateEventSource = new OC_EventSource();
$watcher = new UpdateWatcher($updateEventSource);
OC_Hook::connect('update', 'success', $watcher, 'success');
@@ -99,6 +101,7 @@ class UpdateWatcher {
OC_Util::obEnd();
$this->eventSource->send('failure', $message);
$this->eventSource->close();
+ OC_Config::setValue('maintenance', false);
die();
}
diff --git a/lib/base.php b/lib/base.php
index 8633ae9b637..1e4bbff49cf 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -282,10 +282,6 @@ class OC {
$currentVersion = implode('.', OC_Util::getVersion());
if (version_compare($currentVersion, $installedVersion, '>')) {
if ($showTemplate && !OC_Config::getValue('maintenance', false)) {
- OC_Config::setValue('maintenance', true);
- OC_Log::write('core',
- 'starting upgrade from ' . $installedVersion . ' to ' . $currentVersion,
- OC_Log::WARN);
$minimizerCSS = new OC_Minimizer_CSS();
$minimizerCSS->clearCache();
$minimizerJS = new OC_Minimizer_JS();