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:
authormattab <matthieu.aubry@gmail.com>2014-05-15 04:34:19 +0400
committermattab <matthieu.aubry@gmail.com>2014-05-15 04:34:19 +0400
commite5c0c331d7ad900955f8eee6f4a6a599fd6aa779 (patch)
tree3328f49366c0f42deca29ff6ea07a3b9b8440c8c /core/SettingsPiwik.php
parent956854495afd54080a310d7741bc20a6a9890097 (diff)
When Piwik is not installed yet, the app-id match did not work.
Diffstat (limited to 'core/SettingsPiwik.php')
-rw-r--r--core/SettingsPiwik.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index c05547d529..723ea065dc 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -304,9 +304,14 @@ class SettingsPiwik
} catch (Exception $e) {
$fetched = "ERROR fetching: " . $e->getMessage();
}
- $expectedString = 'app-id=737216887';
+ // this will match when Piwik not installed yet, or favicon not customised
+ $expectedStringAlt = 'plugins/CoreHome/images/favicon.ico';
- if (strpos($fetched, $expectedString) === false) {
+ // this will match when Piwik is installed and favicon has been customised
+ $expectedString = 'misc/user/favicon.png';
+
+ $expectedStringNotFound = strpos($fetched, $expectedString) === false && strpos($fetched, $expectedStringAlt) === false;
+ if ($expectedStringNotFound) {
throw new Exception("\nPiwik should be running at: "
. $piwikServerUrl
. " but this URL returned an unexpected response: '"