diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-07-12 20:25:04 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-07-12 20:25:04 +0300 |
commit | 970ddbf110afe0fc1f3a13c272bbfd8df47379f7 (patch) | |
tree | b01aae8af8716a40bfb1178b49654d910feebb0c /core/SettingsPiwik.php | |
parent | eda2756defc0b1f7cf124169a07ce88c36b0ea4d (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.php | 3 |
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 |