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:
authormattab <matthieu.aubry@gmail.com>2015-02-27 06:02:08 +0300
committermattab <matthieu.aubry@gmail.com>2015-02-27 06:02:08 +0300
commitb08b9295293668eb17aa21639bae932e915633cb (patch)
tree36051a3ad4f804be9b2d1a96335577f5eb3b6440 /core/ArchiveProcessor.php
parentfffa24c111dc3ed92ba5b3fc8395e05384e86f99 (diff)
Fixes #7310 - remove unused code & logic
Diffstat (limited to 'core/ArchiveProcessor.php')
-rw-r--r--core/ArchiveProcessor.php33
1 files changed, 7 insertions, 26 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index 17716000e8..a8254259e8 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -214,14 +214,9 @@ class ArchiveProcessor
$table = $this->aggregateDataTableRecord($recordName, $columnsAggregationOperation, $columnsToRenameAfterAggregation);
- $rowsCount = $table->getRowsCount();
- $nameToCount[$recordName]['level0'] = $rowsCount;
+ $nameToCount[$recordName]['level0'] = $table->getRowsCount();
- $rowsCountRecursive = $rowsCount;
- if ($this->isAggregateSubTables()) {
- $rowsCountRecursive = $table->getRowsCountRecursive();
- }
- $nameToCount[$recordName]['recursive'] = $rowsCountRecursive;
+ $nameToCount[$recordName]['recursive'] = $table->getRowsCountRecursive();
$blob = $table->getSerialized($maximumRowsInDataTableLevelZero, $maximumRowsInSubDataTable, $columnToSortByBeforeTruncation);
Common::destroy($table);
@@ -346,14 +341,8 @@ class ArchiveProcessor
*/
protected function aggregateDataTableRecord($name, $columnsAggregationOperation = null, $columnsToRenameAfterAggregation = null)
{
- if ($this->isAggregateSubTables()) {
- // By default we shall aggregate all sub-tables.
- $dataTable = $this->getArchive()->getDataTableExpanded($name, $idSubTable = null, $depth = null, $addMetadataSubtableId = false);
- } else {
- // In some cases (eg. Actions plugin when period=range),
- // for better performance we will only aggregate the parent table
- $dataTable = $this->getArchive()->getDataTable($name, $idSubTable = null);
- }
+ // By default we shall aggregate all sub-tables.
+ $dataTable = $this->getArchive()->getDataTableExpanded($name, $idSubTable = null, $depth = null, $addMetadataSubtableId = false);
if ($dataTable instanceof Map) {
// see https://github.com/piwik/piwik/issues/4377
@@ -471,7 +460,7 @@ class ArchiveProcessor
// as $date => $tableToSum
$this->aggregatedDataTableMapsAsOne($data, $table);
} else {
- $table->addDataTable($data, $this->isAggregateSubTables());
+ $table->addDataTable($data);
}
return $table;
@@ -488,7 +477,7 @@ class ArchiveProcessor
if ($tableToAggregate instanceof Map) {
$this->aggregatedDataTableMapsAsOne($tableToAggregate, $aggregated);
} else {
- $aggregated->addDataTable($tableToAggregate, $this->isAggregateSubTables());
+ $aggregated->addDataTable($tableToAggregate);
}
}
}
@@ -504,7 +493,7 @@ class ArchiveProcessor
}
foreach ($columnsToRenameAfterAggregation as $oldName => $newName) {
- $table->renameColumn($oldName, $newName, $this->isAggregateSubTables());
+ $table->renameColumn($oldName, $newName);
}
}
@@ -540,12 +529,4 @@ class ArchiveProcessor
return $metrics;
}
-
- /**
- * @return bool
- */
- protected function isAggregateSubTables()
- {
- return !$this->getParams()->isSkipAggregationOfSubTables();
- }
}