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:
authorPeter Zhang <peter@innocraft.com>2022-02-14 14:01:16 +0300
committerGitHub <noreply@github.com>2022-02-14 14:01:16 +0300
commit65383e52a22cb5d1d5e1497f646a27d21c780034 (patch)
treead6c239d5c103678d153c40c09676175ba2b0288 /plugins/MultiSites
parent48020c27e137c7e9ce9db6c20794cdfd2ddefa8b (diff)
[Hotfix]add date, period params into common function (#18686)
* Update Common.php add array check in common request * Update Common.php test * add common period and date function add common period and date function * Update core/Piwik.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update core/Piwik.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * update function update function * Update core/Piwik.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update Controller.php update isset check * Update core/Plugin/Controller.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update core/Piwik.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * update isset check update isset check * Update Piwik.php update phpdocs * Update core/Visualization/Sparkline.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update Controller.php pass param * Update core/Plugin/Controller.php Co-authored-by: Stefan Giehl <stefan@matomo.org> Co-authored-by: Stefan Giehl <stefan@matomo.org>
Diffstat (limited to 'plugins/MultiSites')
-rw-r--r--plugins/MultiSites/Controller.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php
index 86792958f6..715c59a732 100644
--- a/plugins/MultiSites/Controller.php
+++ b/plugins/MultiSites/Controller.php
@@ -70,12 +70,15 @@ class Controller extends \Piwik\Plugin\Controller
return json_encode($response);
}
+ /**
+ * @throws \Piwik\NoAccessException
+ */
public function getSitesInfo($isWidgetized = false)
{
Piwik::checkUserHasSomeViewAccess();
- $date = Common::getRequestVar('date', 'today');
- $period = Common::getRequestVar('period', 'day');
+ $date = Piwik::getDate('today');
+ $period = Piwik::getPeriod('day');
$view = new View("@MultiSites/getSitesInfo");
@@ -93,8 +96,8 @@ class Controller extends \Piwik\Plugin\Controller
) {
$view->autoRefreshTodayReport = Config::getInstance()->General['multisites_refresh_after_seconds'];
}
-
- $params = $this->getGraphParamsModified();
+ $paramsToSet = ['period' => $period, 'date' => $date];
+ $params = $this->getGraphParamsModified($paramsToSet);
$view->dateSparkline = $period == 'range' ? $date : $params['date'];
$this->setGeneralVariablesView($view);