Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-11 02:04:43 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-11 02:04:43 +0400
commit2b2004b1a2df423455b4b3f87c755ea698703f6a (patch)
tree526759b03b8b1933838e95e741e8c5d9d4e6f96d /core
parent5e29f7d3246f748cc90e472711664e65c0e573f2 (diff)
missing file
Diffstat (limited to 'core')
-rw-r--r--core/ajax/update.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 0b1c9386282..6aa062ef9da 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -5,11 +5,13 @@ require_once '../../lib/base.php';
if (OC::checkUpgrade(false)) {
\OC_DB::enableCaching(false);
+
+ // initialize the event source before we enter maintenance mode because CSRF protection can terminate the script
+ $updateEventSource = new OC_EventSource();
OC_Config::setValue('maintenance', true);
$installedVersion = OC_Config::getValue('version', '0.0.0');
$currentVersion = implode('.', OC_Util::getVersion());
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');
OC_Hook::connect('update', 'error', $watcher, 'error');