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:
authordiosmosis <benaka@piwik.pro>2014-11-09 09:12:47 +0300
committerdiosmosis <benaka@piwik.pro>2014-11-09 09:12:47 +0300
commitccfc07ee093025d85cfc7f1a39ce57021dc7554a (patch)
tree59745ddf5db908cb10b3783bcf4b0f92e9d96be8 /plugins/Actions/API.php
parent773f85166aefd8a056f6ef931a5a2507b99b35bd (diff)
Fixing most of the tests.
Diffstat (limited to 'plugins/Actions/API.php')
-rw-r--r--plugins/Actions/API.php16
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