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
path: root/core
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-04-19 09:50:21 +0300
committerdiosmosis <benaka@piwik.pro>2015-05-10 08:41:17 +0300
commit19c46aaaf366edad3454c0c8e717cfef057f0136 (patch)
tree0ad4b5a01652027abadfb26a0a71b88e793f2011 /core
parent6c021792f4cc0e53c170d34a1204b7f90ee44ab5 (diff)
Fix TrackerTest.php (includes fix to RequestCommand due to cache use in UrlHelper::getArrayFromQueryString).
Diffstat (limited to 'core')
-rw-r--r--core/CliMulti/RequestCommand.php2
-rw-r--r--core/Tracker/ScheduledTasksRunner.php3
-rw-r--r--core/UrlHelper.php3
3 files changed, 5 insertions, 3 deletions
diff --git a/core/CliMulti/RequestCommand.php b/core/CliMulti/RequestCommand.php
index 55d82ec160..88d6458535 100644
--- a/core/CliMulti/RequestCommand.php
+++ b/core/CliMulti/RequestCommand.php
@@ -89,7 +89,7 @@ class RequestCommand extends ConsoleCommand
Url::setHost($hostname);
$query = $input->getArgument('url-query');
- $query = UrlHelper::getArrayFromQueryString($query);
+ $query = UrlHelper::getArrayFromQueryString($query); // NOTE: this method can create the StaticContainer now
foreach ($query as $name => $value) {
$_GET[$name] = $value;
}
diff --git a/core/Tracker/ScheduledTasksRunner.php b/core/Tracker/ScheduledTasksRunner.php
index 332f2b7047..b1955c34ba 100644
--- a/core/Tracker/ScheduledTasksRunner.php
+++ b/core/Tracker/ScheduledTasksRunner.php
@@ -81,8 +81,7 @@ class ScheduledTasksRunner
$tokens = CronArchive::getSuperUserTokenAuths();
$tokenAuth = reset($tokens);
- $invokeScheduledTasksUrl = SettingsPiwik::getPiwikUrl()
- . "?module=API&format=csv&convertToUnicode=0&method=CoreAdminHome.runScheduledTasks&trigger=archivephp&token_auth=$tokenAuth";
+ $invokeScheduledTasksUrl = "?module=API&format=csv&convertToUnicode=0&method=CoreAdminHome.runScheduledTasks&trigger=archivephp&token_auth=$tokenAuth";
$cliMulti = new CliMulti();
$responses = $cliMulti->request(array($invokeScheduledTasksUrl));
diff --git a/core/UrlHelper.php b/core/UrlHelper.php
index 20501515f2..bcea3c979f 100644
--- a/core/UrlHelper.php
+++ b/core/UrlHelper.php
@@ -156,6 +156,9 @@ class UrlHelper
return array();
}
+ // TODO: this method should not use a cache. callers should instead have their own cache, configured through DI.
+ // one undesirable side effect of using a cache here, is that this method can now init the StaticContainer, which makes setting
+ // test environment for RequestCommand more complicated.
$cache = Cache::getTransientCache();
$cacheKey = 'arrayFromQuery' . $urlQuery;