diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-04-09 20:51:43 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-05-04 00:05:29 +0200 |
commit | 41f7eb948ad09632764cd8503dcec6c5fa6093cd (patch) | |
tree | 7957d4e3f7c4090b46722ea94e536a699aa7ff19 | |
parent | 4f6565d8e7479ed637cc5e418e7dc768a54c4b0a (diff) | |
download | nextcloud-server-41f7eb948ad09632764cd8503dcec6c5fa6093cd.tar.gz nextcloud-server-41f7eb948ad09632764cd8503dcec6c5fa6093cd.zip |
Move start of the maintenance mode to the ajax call
Make sure the update page is shown in a browser. And not an ajax request
-rw-r--r-- | core/ajax/update.php | 3 | ||||
-rw-r--r-- | lib/base.php | 4 |
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(); |