@@ -32,31 +32,31 @@ |
||
32 | 32 | |
33 | 33 | class EncryptionLegacyCipher implements IRepairStep { |
34 | 34 | |
35 | - /** @var IConfig */ |
|
36 | - private $config; |
|
37 | - /** @var IManager */ |
|
38 | - private $manager; |
|
39 | - |
|
40 | - public function __construct(IConfig $config, |
|
41 | - IManager $manager) { |
|
42 | - $this->config = $config; |
|
43 | - $this->manager = $manager; |
|
44 | - } |
|
45 | - |
|
46 | - public function getName(): string { |
|
47 | - return 'Keep legacy encryption enabled'; |
|
48 | - } |
|
49 | - |
|
50 | - private function shouldRun(): bool { |
|
51 | - $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); |
|
52 | - return version_compare($versionFromBeforeUpdate, '20.0.0.0', '<='); |
|
53 | - } |
|
54 | - |
|
55 | - public function run(IOutput $output): void { |
|
56 | - if ($this->manager->isEnabled()) { |
|
57 | - if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { |
|
58 | - $this->config->setSystemValue('encryption.legacy_format_support', true); |
|
59 | - } |
|
60 | - } |
|
61 | - } |
|
35 | + /** @var IConfig */ |
|
36 | + private $config; |
|
37 | + /** @var IManager */ |
|
38 | + private $manager; |
|
39 | + |
|
40 | + public function __construct(IConfig $config, |
|
41 | + IManager $manager) { |
|
42 | + $this->config = $config; |
|
43 | + $this->manager = $manager; |
|
44 | + } |
|
45 | + |
|
46 | + public function getName(): string { |
|
47 | + return 'Keep legacy encryption enabled'; |
|
48 | + } |
|
49 | + |
|
50 | + private function shouldRun(): bool { |
|
51 | + $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0'); |
|
52 | + return version_compare($versionFromBeforeUpdate, '20.0.0.0', '<='); |
|
53 | + } |
|
54 | + |
|
55 | + public function run(IOutput $output): void { |
|
56 | + if ($this->manager->isEnabled()) { |
|
57 | + if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { |
|
58 | + $this->config->setSystemValue('encryption.legacy_format_support', true); |
|
59 | + } |
|
60 | + } |
|
61 | + } |
|
62 | 62 | } |