Refine version comparision for repair job for major version updates

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2021-05-19 10:12:57 +02:00
parent b89f4b33f0
commit a577768aa6
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ class LookupServerSendCheck implements IRepairStep {
$versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0');
// was added to 22.0.0.3
return version_compare($versionFromBeforeUpdate, '22.0.0.3', '<') &&
version_compare($versionFromBeforeUpdate, '22.0.0.0', '>=');
return (version_compare($versionFromBeforeUpdate, '22.0.0.3', '<') && version_compare($versionFromBeforeUpdate, '22.0.0.0', '>='))
||
(version_compare($versionFromBeforeUpdate, '21.0.1.2', '<') && version_compare($versionFromBeforeUpdate, '21.0.0.0', '>'));
}
public function run(IOutput $output): void {