diff options
author | diosmosis <benaka@piwik.pro> | 2014-11-09 09:12:47 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-11-09 09:12:47 +0300 |
commit | ccfc07ee093025d85cfc7f1a39ce57021dc7554a (patch) | |
tree | 59745ddf5db908cb10b3783bcf4b0f92e9d96be8 /plugins/Actions/API.php | |
parent | 773f85166aefd8a056f6ef931a5a2507b99b35bd (diff) |
Fixing most of the tests.
Diffstat (limited to 'plugins/Actions/API.php')
-rw-r--r-- | plugins/Actions/API.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index cdb34b9961..dc43950b3c 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -498,13 +498,15 @@ class API extends \Piwik\Plugin\API return Archive::getDataTableFromArchive($name, $idSite, $period, $date, $segment, $expanded, $idSubtable, $skipAggregationOfSubTables, $depth); } - private function addPageprocessedMetrics(DataTable $dataTable) + private function addPageProcessedMetrics(DataTable\DataTableInterface $dataTable) { - $extraProcessedMetrics = $dataTable->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); - $extraProcessedMetrics[] = new AverageTimeOnPage(); - $extraProcessedMetrics[] = new BounceRate(); - $extraProcessedMetrics[] = new ExitRate(); - $extraProcessedMetrics[] = new AveragePageGenerationTime(); - $dataTable->setMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME, $extraProcessedMetrics); + $dataTable->filter(function (DataTable $table) { + $extraProcessedMetrics = $table->getMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME); + $extraProcessedMetrics[] = new AverageTimeOnPage(); + $extraProcessedMetrics[] = new BounceRate(); + $extraProcessedMetrics[] = new ExitRate(); + $extraProcessedMetrics[] = new AveragePageGenerationTime(); + $table->setMetadata(DataTable::EXTRA_PROCESSED_METRICS_METADATA_NAME, $extraProcessedMetrics); + }); } }
\ No newline at end of file |