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
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-13 14:53:29 +0400
committerBjörn Schießle <schiessle@owncloud.com>2013-06-13 14:53:29 +0400
commitbc2862fcb947ac65c80b5d49ea8f2c2271eb8021 (patch)
tree30938e61873554edd056de942189ac3851e9d488 /apps/files_encryption/hooks
parentfd5042cc460ec35112cc69928e441b5395142190 (diff)
parent54f3174665262a5d1b1e1135667342b17b5d05b0 (diff)
Merge branch 'master' into files_encryption_upgrade_fix
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r--apps/files_encryption/hooks/hooks.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 94fc19fae2a..0580b713d1a 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -67,10 +67,13 @@ class Hooks {
$session->setPrivateKey($privateKey, $params['uid']);
// Check if first-run file migration has already been performed
- $migrationCompleted = $util->getMigrationStatus();
+ $ready = false;
+ if ($util->getMigrationStatus() === Util::MIGRATION_OPEN) {
+ $ready = $util->beginMigration();
+ }
// If migration not yet done
- if (!$migrationCompleted) {
+ if ($ready) {
$userView = new \OC_FilesystemView('/' . $params['uid']);
@@ -102,7 +105,7 @@ class Hooks {
}
// Register successful migration in DB
- $util->setMigrationStatus(1);
+ $util->finishMigration();
}