diff options
author | diosmosis <benaka@piwik.pro> | 2015-06-22 12:33:32 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-22 12:33:32 +0300 |
commit | 9f755bc0dc7e1a76e5692f9fca86bc0d4535c5ec (patch) | |
tree | d850d4ff318e05774864709791ff323dbdc5f43e /plugins/API | |
parent | 9480a9b15e466c455631d3935fb6dc97cdeafd18 (diff) |
Fix regression in API.getProcessedReport, it should not format metrics if showRawMetrics is true. And correctly fdisplay and format avg_time_on_site using processed metric value, instead of recalculating in visitor map.
Diffstat (limited to 'plugins/API')
-rw-r--r-- | plugins/API/ProcessedReport.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php index 7c4bd46c9e..31a6d16966 100644 --- a/plugins/API/ProcessedReport.php +++ b/plugins/API/ProcessedReport.php @@ -393,7 +393,7 @@ class ProcessedReport 'serialize' => '0', 'language' => $language, 'idSubtable' => $idSubtable, - 'format_metrics' => 1, + 'format_metrics' => $showRawMetrics ? 'bc' : '1', )); if (!empty($segment)) $parameters['segment'] = $segment; @@ -668,7 +668,9 @@ class ProcessedReport foreach ($rowMetrics as $columnName => $columnValue) { // filter metrics according to metadata definition - if (isset($metadataColumns[$columnName])) { + if (isset($metadataColumns[$columnName]) + && !$returnRawMetrics + ) { // generate 'human readable' metric values // if we handle MultiSites.getAll we do not always have the same idSite but different ones for |