diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2010-06-23 01:40:25 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2010-06-23 01:40:25 +0400 |
commit | aa2d2e46545123a0d235dacbc48899ff5d15a906 (patch) | |
tree | 3a933d30f1d842024a19d3b919068ecb62bb4157 | |
parent | e1e87c91c1dd4a998658ce7d7f6c7646c8a149ec (diff) |
Do not execute updates that are from newer versions than current version. otherwise 0.6.3 update was executing in the current rc1 version
git-svn-id: http://dev.piwik.org/svn/trunk@2349 59fd770c-687e-43c8-a1e3-f5a4ff64c105
-rw-r--r-- | core/Updater.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Updater.php b/core/Updater.php index a6d1ca7a93..2b707cba50 100644 --- a/core/Updater.php +++ b/core/Updater.php @@ -203,7 +203,10 @@ class Piwik_Updater foreach( $files as $file) { $fileVersion = basename($file, '.php'); - if(version_compare($currentVersion, $fileVersion) == -1) + if( // if the update is from a newer version + version_compare($currentVersion, $fileVersion) == -1 + // but we don't execute updates from non existing future releases + && version_compare($fileVersion, $newVersion) == -1) { $componentsWithUpdateFile[$name][$file] = $fileVersion; } |