diff options
author | diosmosis <benaka@piwik.pro> | 2014-11-07 22:22:39 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-11-07 22:22:39 +0300 |
commit | abedc85c37f6fdd1c0d306852162841a78f4fa3d (patch) | |
tree | dc9ae426195027a29b0c0fac7eb240ac607e8b07 /plugins | |
parent | 2755791a3e0e62a22e405f976939e24a5cc4a46f (diff) |
Fixing some tests, make sure processed metrics are computed even if generic filters disabled, and do not apply queued filters in datatablemanipulators when fetching subtables.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Actions/API.php | 4 | ||||
-rw-r--r-- | plugins/Actions/Metrics/AveragePageGenerationTime.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index e98005fded..afff715053 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -54,7 +54,7 @@ class API extends \Piwik\Plugin\API $archive = Archive::build($idSite, $period, $date, $segment); $columns = Piwik::getArrayFromApiParameter($columns); - $columns = Report::factory("Actions", "get")->getMetricsRequiredForReport(Archiver::$actionsAggregateMetrics, $columns); + $columns = Report::factory("Actions", "get")->getMetricsRequiredForReport($allColumns = null, $columns); $inDbColumnNames = array_map(function ($value) { return 'Actions_' . $value; }, $columns); $dataTable = $archive->getDataTableFromNumeric($inDbColumnNames); @@ -62,7 +62,7 @@ class API extends \Piwik\Plugin\API $newNameMapping = array_combine($inDbColumnNames, $columns); $dataTable->filter('ReplaceColumnNames', array($newNameMapping)); - $dataTable->filter('ColumnDelete', array(array('sum_time_generation','nb_hits_with_time_generation'))); + $dataTable->queueFilter('ColumnDelete', array(array('sum_time_generation', 'nb_hits_with_time_generation'))); return $dataTable; } diff --git a/plugins/Actions/Metrics/AveragePageGenerationTime.php b/plugins/Actions/Metrics/AveragePageGenerationTime.php index 01d7e04e4c..8c414bc955 100644 --- a/plugins/Actions/Metrics/AveragePageGenerationTime.php +++ b/plugins/Actions/Metrics/AveragePageGenerationTime.php @@ -34,8 +34,8 @@ class AveragePageGenerationTime extends ProcessedMetric public function compute(Row $row) { - $sumGenerationTime = $this->getColumn($row, Archiver::METRIC_SUM_TIME_RECORD_NAME); - $hitsWithTimeGeneration = $this->getColumn($row, Archiver::METRIC_HITS_TIMED_RECORD_NAME); + $sumGenerationTime = $this->getColumn($row, 'sum_time_generation'); + $hitsWithTimeGeneration = $this->getColumn($row, 'nb_hits_with_time_generation'); return Piwik::getQuotientSafe($sumGenerationTime, $hitsWithTimeGeneration, $precision = 3); } |