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:
authorStefan Giehl <stefan@piwik.org>2017-05-08 12:14:35 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-05-08 12:14:35 +0300
commit6d263a4e2820147f03056f8db8ee4c606b46a09b (patch)
tree4da3fdc785dbbe87deee1a5dd8990741765e8540 /plugins/VisitTime
parent16fc44a11111b022a2c070dc9410e794fa3771d4 (diff)
Fix VisitByServerTime api method to handle Datatable Maps (#11619)
Diffstat (limited to 'plugins/VisitTime')
-rw-r--r--plugins/VisitTime/API.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php
index f706860b4e..28b73b99a4 100644
--- a/plugins/VisitTime/API.php
+++ b/plugins/VisitTime/API.php
@@ -54,7 +54,13 @@ class API extends \Piwik\Plugin\API
$table->filter('Piwik\Plugins\VisitTime\DataTable\Filter\AddSegmentByLabelInUTC', array($timezone, $period, $date));
if ($hideFutureHoursWhenToday) {
- $table = $this->removeHoursInFuture($table, $idSite, $period, $date);
+ if ($table instanceof DataTable\Map) {
+ foreach ($table->getDataTables() as &$dataTable) {
+ $dataTable = $this->removeHoursInFuture($dataTable, $idSite, $period, $date);
+ }
+ } else {
+ $table = $this->removeHoursInFuture($table, $idSite, $period, $date);
+ }
}
return $table;