diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-06-13 12:53:29 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-06-13 12:53:29 +0200 |
commit | bc2862fcb947ac65c80b5d49ea8f2c2271eb8021 (patch) | |
tree | 30938e61873554edd056de942189ac3851e9d488 /apps/files_encryption/hooks | |
parent | fd5042cc460ec35112cc69928e441b5395142190 (diff) | |
parent | 54f3174665262a5d1b1e1135667342b17b5d05b0 (diff) | |
download | nextcloud-server-bc2862fcb947ac65c80b5d49ea8f2c2271eb8021.tar.gz nextcloud-server-bc2862fcb947ac65c80b5d49ea8f2c2271eb8021.zip |
Merge branch 'master' into files_encryption_upgrade_fix
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 9 |
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();
}
|