summaryrefslogtreecommitdiffstats
path: root/apps/encryption/command
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-07-17 12:49:45 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-07-17 15:19:10 +0200
commit3000f0125fe9470012c362a13ecc33a31cceff18 (patch)
tree0425400f4844391c8457984443198dd7574cf4ab /apps/encryption/command
parent87234103195c64ab1791a7865c9a9f1c0486c418 (diff)
downloadnextcloud-server-3000f0125fe9470012c362a13ecc33a31cceff18.tar.gz
nextcloud-server-3000f0125fe9470012c362a13ecc33a31cceff18.zip
don't move keys if the key where already moved in a previous migration run
Diffstat (limited to 'apps/encryption/command')
-rw-r--r--apps/encryption/command/migratekeys.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/encryption/command/migratekeys.php b/apps/encryption/command/migratekeys.php
index d0fc1573061..7e320102172 100644
--- a/apps/encryption/command/migratekeys.php
+++ b/apps/encryption/command/migratekeys.php
@@ -27,6 +27,7 @@ use OC\Files\View;
use OC\User\Manager;
use OCA\Encryption\Migration;
use OCP\IConfig;
+use OCP\ILogger;
use OCP\IUserBackend;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
@@ -44,22 +45,27 @@ class MigrateKeys extends Command {
private $connection;
/** @var IConfig */
private $config;
+ /** @var ILogger */
+ private $logger;
/**
* @param Manager $userManager
* @param View $view
* @param Connection $connection
* @param IConfig $config
+ * @param ILogger $logger
*/
public function __construct(Manager $userManager,
View $view,
Connection $connection,
- IConfig $config) {
+ IConfig $config,
+ ILogger $logger) {
$this->userManager = $userManager;
$this->view = $view;
$this->connection = $connection;
$this->config = $config;
+ $this->logger = $logger;
parent::__construct();
}
@@ -77,7 +83,7 @@ class MigrateKeys extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
// perform system reorganization
- $migration = new Migration($this->config, $this->view, $this->connection);
+ $migration = new Migration($this->config, $this->view, $this->connection, $this->logger);
$users = $input->getArgument('user_id');
if (!empty($users)) {