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:
authorThomas Steur <thomas.steur@gmail.com>2016-01-11 05:56:12 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-01-11 06:43:58 +0300
commitae71bc82304f7d25490acce6f1e55a6d97a37206 (patch)
tree2306039989ae6d5b6b9faee4a00b9bf6de0b78f0 /core/SettingsPiwik.php
parent41b743af65b1b67c49022790f9b1afae79192e3f (diff)
Do not overwrite piwikUrl when host is localhost
Diffstat (limited to 'core/SettingsPiwik.php')
-rw-r--r--core/SettingsPiwik.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index 7a50263e39..b0df27b2b6 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -186,7 +186,10 @@ class SettingsPiwik
// if URL changes, always update the cache
|| $currentUrl != $url
) {
- if (strlen($currentUrl) >= strlen('http://a/')) {
+ $host = Url::getHostFromUrl($url);
+
+ if (strlen($currentUrl) >= strlen('http://a/')
+ && !Url::isLocalHost($host)) {
self::overwritePiwikUrl($currentUrl);
}
$url = $currentUrl;