diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-31 19:34:44 +0300 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-31 19:35:35 +0300 |
commit | 6ccbf4bce64bc7016d65f270c22f37fdbca8e21f (patch) | |
tree | 9df9da4b1f7f904208506bcdcc8ecf2f65215d80 /lib/private/updater.php | |
parent | 3b37c203193b91253f814fa76257352279f5b6f3 (diff) |
Improved update version detection logic
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r-- | lib/private/updater.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index 639571e8f70..71e9732c307 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -230,14 +230,8 @@ class Updater extends BasicEmitter { * @return bool */ public function isUpgradePossible($oldVersion, $newVersion, $allowedPreviousVersion) { - // downgrade is never allowed - if (version_compare($oldVersion, $newVersion, '>')) { - return false; - } - - // either we're updating from an allowed version or the current version return (version_compare($allowedPreviousVersion, $oldVersion, '<=') - || version_compare($newVersion, $oldVersion) === 0); + && version_compare($oldVersion, $newVersion, '<=')); } /** |