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:
-rw-r--r--core/SettingsPiwik.php3
-rw-r--r--tests/PHPUnit/System/ArchiveWebTest.php2
2 files changed, 4 insertions, 1 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
diff --git a/tests/PHPUnit/System/ArchiveWebTest.php b/tests/PHPUnit/System/ArchiveWebTest.php
index 527f5c6477..745b12e0ec 100644
--- a/tests/PHPUnit/System/ArchiveWebTest.php
+++ b/tests/PHPUnit/System/ArchiveWebTest.php
@@ -74,7 +74,7 @@ class ArchiveWebTest extends SystemTestCase
$this->assertNotContains('WARNING', $output);
// Check there are enough lines in output
- $minimumLinesInOutput = 60;
+ $minimumLinesInOutput = 30;
$linesInOutput = count( explode(PHP_EOL, $output) );
$this->assertGreaterThan($minimumLinesInOutput, $linesInOutput);
}