diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-05-08 12:14:35 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-05-08 12:14:35 +0300 |
commit | 6d263a4e2820147f03056f8db8ee4c606b46a09b (patch) | |
tree | 4da3fdc785dbbe87deee1a5dd8990741765e8540 /plugins/VisitTime | |
parent | 16fc44a11111b022a2c070dc9410e794fa3771d4 (diff) |
Fix VisitByServerTime api method to handle Datatable Maps (#11619)
Diffstat (limited to 'plugins/VisitTime')
-rw-r--r-- | plugins/VisitTime/API.php | 8 |
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; |