From e57984d9cfaa84ad1213d32ad93879ecd47d02cc Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Wed, 4 Jun 2014 01:05:04 +0200 Subject: [PATCH] refs #4872 this should fix getPageUrl returns same results for several day when a range is used. Waiting to see which tests fail. In this case date always equaled to "2014-03-11,2014-03-18" for each subtable/day --- plugins/Actions/API.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 9ced0fe3d10..b7855ef8a94 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -458,6 +458,15 @@ protected function doFilterPageDatatableSearch($callBackParameters, $table, $sea // match found on this level and more levels remaining: go deeper $idSubTable = $row->getIdSubDataTable(); $callBackParameters[6] = $idSubTable; + + /** + * @var \Piwik\Period $period + */ + $period = $table->getMetadata('period'); + if (!empty($period)) { + $callBackParameters[3] = $period->getDateStart() . ',' . $period->getDateEnd(); + } + $table = call_user_func_array(array($this, 'getDataTableFromArchive'), $callBackParameters); return $this->doFilterPageDatatableSearch($callBackParameters, $table, $searchTree); }