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/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;