diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php index b6e66cb8e9c444984eae4130e605b2b3ac983a5a..2354b88b9b7ed570127ea786c4337b0ef323a8f9 100644 --- a/plugins/Transitions/API.php +++ b/plugins/Transitions/API.php @@ -72,19 +72,19 @@ class API extends \Piwik\Plugin\API throw new Exception('NoDataForAction'); } - // prepare archive processing that can be used by the archiving code + // prepare log aggregator $segment = new Segment($segment, $idSite); $site = new Site($idSite); $period = Period::factory($period, $date); - $archiveProcessor = new ArchiveProcessor($period, $site, $segment); - $logAggregator = $archiveProcessor->getLogAggregator(); + $params = new ArchiveProcessor\Parameters($period, $site, $segment); + $logAggregator = new LogAggregator($params); + // prepare the report $report = array( 'date' => Period::factory($period->getLabel(), $date)->getLocalizedShortString() ); $partsArray = explode(',', $parts); - if ($parts == 'all' || in_array('internalReferrers', $partsArray)) { $this->addInternalReferrers($logAggregator, $report, $idaction, $actionType, $limitBeforeGrouping); }