diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-31 18:34:44 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-31 18:35:35 +0200 |
commit | 6ccbf4bce64bc7016d65f270c22f37fdbca8e21f (patch) | |
tree | 9df9da4b1f7f904208506bcdcc8ecf2f65215d80 /lib | |
parent | 3b37c203193b91253f814fa76257352279f5b6f3 (diff) | |
download | nextcloud-server-6ccbf4bce64bc7016d65f270c22f37fdbca8e21f.tar.gz nextcloud-server-6ccbf4bce64bc7016d65f270c22f37fdbca8e21f.zip |
Improved update version detection logic
Diffstat (limited to 'lib')
-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, '<=')); } /** |