diff options
author | Robin Appelman <robin@icewind.nl> | 2017-10-03 17:27:26 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-10-03 17:28:54 +0300 |
commit | 95dc9a89b3e3fb908e733b8d9df99436a78be9a8 (patch) | |
tree | 8ab277150f4ef5ed2fa983b2d1473b299fd6a5b8 /lib/private | |
parent | 4a21eb1c7de0ab6d1c3c817df7efde281c353688 (diff) |
dont run invalid path repair step when upgrading from 11.0.5.2 and later
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Repair/NC13/RepairInvalidPaths.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/private/Repair/NC13/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php index 59115d1a1c8..1b6a7d23ef3 100644 --- a/lib/private/Repair/NC13/RepairInvalidPaths.php +++ b/lib/private/Repair/NC13/RepairInvalidPaths.php @@ -162,10 +162,18 @@ class RepairInvalidPaths implements IRepairStep { return $count; } - public function run(IOutput $output) { + private function shouldRun() { $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0'); - // was added to 12.0.0.30 and 13.0.0.1 - if (version_compare($versionFromBeforeUpdate, '12.0.0.30', '<') || version_compare($versionFromBeforeUpdate, '13.0.0.0', '==')) { + + // was added to 11.0.5.2, 12.0.0.30 and 13.0.0.1 + $shouldRun = version_compare($versionFromBeforeUpdate, '11.0.5.2', '<'); + $shouldRun |= version_compare($versionFromBeforeUpdate, '12.0.0.0', '>=') && version_compare($versionFromBeforeUpdate, '12.0.0.30', '<'); + $shouldRun |= version_compare($versionFromBeforeUpdate, '13.0.0.0', '=='); + return $shouldRun; + } + + public function run(IOutput $output) { + if ($this->shouldRun()) { $count = $this->repair(); $output->info('Repaired ' . $count . ' paths'); |