diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-17 05:19:39 +0300 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-17 05:19:39 +0300 |
commit | 295c67416d54188033f65e040a06c4ef98a061e0 (patch) | |
tree | 7b307fbf23e4c10f96c66c8d04e705b0f2b10f75 /core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php | |
parent | 0bc09f2bcabf9da976a522cf69c3369ecd1bc308 (diff) |
Fixes #173 - making all filters recursive by default (no performance impact since it won't load the tables if they were not loaded in the API). Updating all filters to reflect new abstract class signature
git-svn-id: http://dev.piwik.org/svn/trunk@3764 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php')
-rw-r--r-- | core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php index b802858ee8..337f6e8aa1 100644 --- a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php +++ b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php @@ -48,12 +48,12 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT $this->columnNameUsedAsDivisor = $divisorValueOrDivisorColumnName; } $this->quotientPrecision = $quotientPrecision; - $this->filter(); + $this->filter($table); } - protected function filter() + protected function filter($table) { - foreach($this->table->getRows() as $key => $row) + foreach($table->getRows() as $key => $row) { $value = $row->getColumn($this->columnValueToRead); if(!is_null($this->totalValueUsedAsDivisor)) @@ -66,6 +66,8 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT } $formattedValue = $this->formatValue($value, $divisor); $row->addColumn($this->columnNameToAdd, $formattedValue); + + $this->filterSubTable($row); } } |