diff options
author | Björn Schießle <bjoern@schiessle.org> | 2015-07-20 15:12:52 +0200 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2015-07-20 15:12:52 +0200 |
commit | 89d6439445da8e1cf133bc2e1b6db9709ce4af8b (patch) | |
tree | c2bdd2ad39fd89071a3611dd9dbfbf560beeb0b6 /settings | |
parent | f573659b3aba706e55e312093954cffbc5373a8b (diff) | |
parent | 4dba920fddef822695212f0387623ce65d349f29 (diff) | |
download | nextcloud-server-89d6439445da8e1cf133bc2e1b6db9709ce4af8b.tar.gz nextcloud-server-89d6439445da8e1cf133bc2e1b6db9709ce4af8b.zip |
Merge pull request #17701 from owncloud/fix_repeated_migration
don't move keys if the key where already moved in a previous migration run
Diffstat (limited to 'settings')
-rw-r--r-- | settings/application.php | 3 | ||||
-rw-r--r-- | settings/controller/encryptioncontroller.php | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/settings/application.php b/settings/application.php index 03203b48564..a2f25935e12 100644 --- a/settings/application.php +++ b/settings/application.php @@ -79,7 +79,8 @@ class Application extends App { $c->query('Config'), $c->query('DatabaseConnection'), $c->query('UserManager'), - new View() + new View(), + $c->query('Logger') ); }); $container->registerService('AppSettingsController', function(IContainer $c) { diff --git a/settings/controller/encryptioncontroller.php b/settings/controller/encryptioncontroller.php index 87cbf0a4bf1..7c952962c1a 100644 --- a/settings/controller/encryptioncontroller.php +++ b/settings/controller/encryptioncontroller.php @@ -25,6 +25,7 @@ use OC\Files\View; use OCA\Encryption\Migration; use OCP\IL10N; use OCP\AppFramework\Controller; +use OCP\ILogger; use OCP\IRequest; use OCP\IConfig; use OC\DB\Connection; @@ -50,6 +51,9 @@ class EncryptionController extends Controller { /** @var View */ private $view; + /** @var ILogger */ + private $logger; + /** * @param string $appName * @param IRequest $request @@ -58,6 +62,7 @@ class EncryptionController extends Controller { * @param \OC\DB\Connection $connection * @param IUserManager $userManager * @param View $view + * @param ILogger $logger */ public function __construct($appName, IRequest $request, @@ -65,7 +70,8 @@ class EncryptionController extends Controller { IConfig $config, Connection $connection, IUserManager $userManager, - View $view) { + View $view, + ILogger $logger) { parent::__construct($appName, $request); $this->l10n = $l10n; $this->config = $config; @@ -85,7 +91,7 @@ class EncryptionController extends Controller { try { - $migration = new Migration($this->config, $this->view, $this->connection); + $migration = new Migration($this->config, $this->view, $this->connection, $this->logger); $migration->reorganizeSystemFolderStructure(); $migration->updateDB(); |