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:
authorThomas Steur <thomas.steur@googlemail.com>2014-05-07 04:03:07 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-05-07 04:03:07 +0400
commit9e86c7960608c42aebe1966bb368bb07cc4a34bc (patch)
tree98553c98bf24982eaa498e1b31a6eedc6fc89c14 /core/ArchiveProcessor.php
parentc04cdb5d33d6fbc7bae302254aa9e6846a0f8f92 (diff)
refs #4377 make sure metrics like sum_daily_nb_uniq_visitors (which are renamed after aggregation) are summed correctly. If period is for instance 2014-04-01,2014-05-01 we will sum two periods. The month of April 2014 and May 1st. The dataTable of the month will already contain the renamed column (as it was aggregated before) whereas May 1st datatable will not contain the renamend column but the original. Both columns cannot be summed therefore and the original column will overwrite the value of the renamed column. Meaning sum_daily_nb_uniq_visitors is in this case always the value of May 1st
Diffstat (limited to 'core/ArchiveProcessor.php')
-rw-r--r--core/ArchiveProcessor.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index 20c4c2df80..1c44465e5b 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -337,6 +337,12 @@ class ArchiveProcessor
$dataTable = $this->getArchive()->getDataTable($name, $idSubTable = null);
}
+ if ($dataTable instanceof Map) {
+ foreach ($dataTable->getDataTables() as $table) {
+ $this->renameColumnsAfterAggregation($table, $columnsToRenameAfterAggregation);
+ }
+ }
+
$dataTable = $this->getAggregatedDataTableMap($dataTable, $columnsAggregationOperation);
$this->renameColumnsAfterAggregation($dataTable, $columnsToRenameAfterAggregation);
return $dataTable;