From eaeb5d606dee28f647f2f2b34ec49c9cb6c091ec Mon Sep 17 00:00:00 2001 From: davitol Date: Mon, 6 Jun 2016 15:28:49 +0200 Subject: Fix Decrypt message via occ --- core/Command/Encryption/DecryptAll.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'core/Command/Encryption') diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index 8d7d26f3d23..26dbe79b5cc 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -118,6 +118,8 @@ class DecryptAll extends Command { protected function execute(InputInterface $input, OutputInterface $output) { try { + + if ($this->encryptionManager->isEnabled() === true) { $output->write('Disable server side encryption... '); $this->config->setAppValue('core', 'encryption_enabled', 'no'); @@ -127,8 +129,15 @@ class DecryptAll extends Command { return; } + $uid = $input->getArgument('user'); + if (empty($uid)) { + $message = 'your ownCloud'; + } else { + $message = "$uid's account"; + } + $output->writeln("\n"); - $output->writeln('You are about to start to decrypt all files stored in your ownCloud.'); + $output->writeln("You are about to start to decrypt all files stored in $message."); $output->writeln('It will depend on the encryption module and your setup if this is possible.'); $output->writeln('Depending on the number and size of your files this can take some time'); $output->writeln('Please make sure that no user access his files during this process!'); @@ -140,6 +149,7 @@ class DecryptAll extends Command { $result = $this->decryptAll->decryptAll($input, $output, $user); if ($result === false) { $output->writeln(' aborted.'); + $output->write('Enable server side encryption... '); $this->config->setAppValue('core', 'encryption_enabled', 'yes'); } $this->resetSingleUserAndTrashbin(); -- cgit v1.2.3 From f9b386509384c3d8c0c355d45c2c4f7a56c846ef Mon Sep 17 00:00:00 2001 From: davitol Date: Mon, 6 Jun 2016 16:10:49 +0200 Subject: Comments fixed --- core/Command/Encryption/DecryptAll.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/Command/Encryption') diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index 26dbe79b5cc..e9cae29e825 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -118,8 +118,6 @@ class DecryptAll extends Command { protected function execute(InputInterface $input, OutputInterface $output) { try { - - if ($this->encryptionManager->isEnabled() === true) { $output->write('Disable server side encryption... '); $this->config->setAppValue('core', 'encryption_enabled', 'no'); @@ -130,6 +128,7 @@ class DecryptAll extends Command { } $uid = $input->getArgument('user'); + //FIXME WHEN https://github.com/owncloud/core/issues/24994 is fixed if (empty($uid)) { $message = 'your ownCloud'; } else { @@ -149,7 +148,7 @@ class DecryptAll extends Command { $result = $this->decryptAll->decryptAll($input, $output, $user); if ($result === false) { $output->writeln(' aborted.'); - $output->write('Enable server side encryption... '); + $output->writeln('Enable server side encryption... '); $this->config->setAppValue('core', 'encryption_enabled', 'yes'); } $this->resetSingleUserAndTrashbin(); -- cgit v1.2.3 From 67c9e598aed8479ff1e46e55563e8582e2299705 Mon Sep 17 00:00:00 2001 From: Sergio BertolĂ­n Date: Tue, 7 Jun 2016 07:55:28 +0000 Subject: Fixed reviews --- core/Command/Encryption/DecryptAll.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/Command/Encryption') diff --git a/core/Command/Encryption/DecryptAll.php b/core/Command/Encryption/DecryptAll.php index e9cae29e825..68dee845f15 100644 --- a/core/Command/Encryption/DecryptAll.php +++ b/core/Command/Encryption/DecryptAll.php @@ -129,7 +129,7 @@ class DecryptAll extends Command { $uid = $input->getArgument('user'); //FIXME WHEN https://github.com/owncloud/core/issues/24994 is fixed - if (empty($uid)) { + if ($uid === null) { $message = 'your ownCloud'; } else { $message = "$uid's account"; @@ -148,7 +148,7 @@ class DecryptAll extends Command { $result = $this->decryptAll->decryptAll($input, $output, $user); if ($result === false) { $output->writeln(' aborted.'); - $output->writeln('Enable server side encryption... '); + $output->writeln('Server side encryption remains enabled'); $this->config->setAppValue('core', 'encryption_enabled', 'yes'); } $this->resetSingleUserAndTrashbin(); -- cgit v1.2.3