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 /core/ajax/update.php | |
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
Diffstat (limited to 'core/ajax/update.php')
-rw-r--r-- | core/ajax/update.php | 3 |
1 files changed, 3 insertions, 0 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(); } |