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:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-12-15 09:57:02 +0300
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-12-15 09:57:02 +0300
commit089217eb9151d77b615ed423eddca95cfe81e1fe (patch)
tree15860044158e81d24ab53d2e3196045ffd276136 /plugins/SecurityInfo
parenta0024b9a41ccfe87f662e5161d1944f625d15d4c (diff)
Fix test to handle case where you've updated manually but the database refers to an old version.
Diffstat (limited to 'plugins/SecurityInfo')
-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.");