[Pkg-owncloud-commits] [owncloud] 55/131: only cleanUp the remaining keys if the migration really finished succesfully

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 15:58:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.

commit 9d9ab82a17ccbf9d309c7cd565ef1b8b16491007
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Wed Jul 8 18:23:18 2015 +0200

    only cleanUp the remaining keys if the migration really finished succesfully
---
 apps/encryption/command/migratekeys.php      | 2 ++
 apps/encryption/lib/migration.php            | 2 +-
 settings/controller/encryptioncontroller.php | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/apps/encryption/command/migratekeys.php b/apps/encryption/command/migratekeys.php
index e6e5e7b..d0fc157 100644
--- a/apps/encryption/command/migratekeys.php
+++ b/apps/encryption/command/migratekeys.php
@@ -115,5 +115,7 @@ class MigrateKeys extends Command {
 			}
 		}
 
+		$migration->finalCleanUp();
+
 	}
 }
diff --git a/apps/encryption/lib/migration.php b/apps/encryption/lib/migration.php
index b5d5dc2..26e2a14 100644
--- a/apps/encryption/lib/migration.php
+++ b/apps/encryption/lib/migration.php
@@ -50,7 +50,7 @@ class Migration {
 		$this->config = $config;
 	}
 
-	public function __destruct() {
+	public function finalCleanUp() {
 		$this->view->deleteAll('files_encryption/public_keys');
 		$this->updateFileCache();
 		$this->config->deleteAppValue('files_encryption', 'installed_version');
diff --git a/settings/controller/encryptioncontroller.php b/settings/controller/encryptioncontroller.php
index 411b9e8..87cbf0a 100644
--- a/settings/controller/encryptioncontroller.php
+++ b/settings/controller/encryptioncontroller.php
@@ -102,6 +102,8 @@ class EncryptionController extends Controller {
 				} while (count($users) >= $limit);
 			}
 
+			$migration->finalCleanUp();
+
 		} catch (\Exception $e) {
 			return array(
 				'data' => array(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list