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>2015-07-12 20:25:04 +0300
committermattab <matthieu.aubry@gmail.com>2015-07-12 20:25:04 +0300
commit970ddbf110afe0fc1f3a13c272bbfd8df47379f7 (patch)
treeb01aae8af8716a40bfb1178b49654d910feebb0c /core/SettingsPiwik.php
parenteda2756defc0b1f7cf124169a07ce88c36b0ea4d (diff)
When script is called from misc/cron/archive.php, still return correct Piwik URL
Diffstat (limited to 'core/SettingsPiwik.php')
-rw-r--r--core/SettingsPiwik.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index af1ea26173..a1082eb4a0 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -179,6 +179,9 @@ class SettingsPiwik
$currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName());
+ // when script is called from /misc/cron/archive.php, Piwik URL is /index.php
+ $currentUrl = str_replace("/misc/cron/", "", $currentUrl);
+
if (empty($url)
// if URL changes, always update the cache
|| $currentUrl != $url