Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2009-12-15 09:57:02 +0300
committerrobocoder <anthon.pang@gmail.com>2009-12-15 09:57:02 +0300
commit8fa4f7afd42b8289da542d2fcc979271a44a38d7 (patch)
tree15860044158e81d24ab53d2e3196045ffd276136 /plugins/SecurityInfo/PhpSecInfo
parent69194940533c2d92f62e85fe23dc0e8a9ebadaaf (diff)
Fix test to handle case where you've updated manually but the database refers to an old version.
git-svn-id: http://dev.piwik.org/svn/trunk@1709 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/SecurityInfo/PhpSecInfo')
-rw-r--r--plugins/SecurityInfo/PhpSecInfo/Test/Application/piwik.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/SecurityInfo/PhpSecInfo/Test/Application/piwik.php b/plugins/SecurityInfo/PhpSecInfo/Test/Application/piwik.php
index eca0590756..5a495a352c 100644
--- a/plugins/SecurityInfo/PhpSecInfo/Test/Application/piwik.php
+++ b/plugins/SecurityInfo/PhpSecInfo/Test/Application/piwik.php
@@ -40,7 +40,7 @@ class PhpSecInfo_Test_Application_Piwik extends PhpSecInfo_Test_Application
return PHPSECINFO_TEST_RESULT_ERROR;
}
- if ( $this->current_value === $this->recommended_value ) {
+ if (version_compare($this->current_value, $this->recommended_value) >= 0) {
return PHPSECINFO_TEST_RESULT_OK;
}
@@ -50,7 +50,7 @@ class PhpSecInfo_Test_Application_Piwik extends PhpSecInfo_Test_Application
function _setMessages() {
parent::_setMessages();
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', "You are running Piwik ".$this->recommended_value." (the latest version).");
+ $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', "You are running Piwik ".$this->current_value." (the latest version).");
$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', "You are running Piwik ".$this->current_value.". The latest version of Piwik is ".$this->recommended_value.".");
$this->setMessageForResult(PHPSECINFO_TEST_RESULT_WARN, 'en', "You are running Piwik ".$this->current_value." which is no longer supported by the Piwik developers. We recommend running the latest (stable) version of Piwik which includes numerous enhancements, bug fixes, and security fixes.");
$this->setMessageForResult(PHPSECINFO_TEST_RESULT_ERROR, 'en', "Unable to determine the latest version of Piwik available.");