Skip to content
Extraits de code Groupes Projets
Valider 970ddbf1 rédigé par mattab's avatar mattab
Parcourir les fichiers

When script is called from misc/cron/archive.php, still return correct Piwik URL

parent eda2756d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -179,6 +179,9 @@ class SettingsPiwik ...@@ -179,6 +179,9 @@ class SettingsPiwik
$currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName()); $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 (empty($url)
// if URL changes, always update the cache // if URL changes, always update the cache
|| $currentUrl != $url || $currentUrl != $url
......
...@@ -74,7 +74,7 @@ class ArchiveWebTest extends SystemTestCase ...@@ -74,7 +74,7 @@ class ArchiveWebTest extends SystemTestCase
$this->assertNotContains('WARNING', $output); $this->assertNotContains('WARNING', $output);
// Check there are enough lines in output // Check there are enough lines in output
$minimumLinesInOutput = 60; $minimumLinesInOutput = 30;
$linesInOutput = count( explode(PHP_EOL, $output) ); $linesInOutput = count( explode(PHP_EOL, $output) );
$this->assertGreaterThan($minimumLinesInOutput, $linesInOutput); $this->assertGreaterThan($minimumLinesInOutput, $linesInOutput);
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter