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/Sort.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/Sort.php')
-rw-r--r-- | core/DataTable/Filter/Sort.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php index 22418b111d..ac6da62990 100644 --- a/core/DataTable/Filter/Sort.php +++ b/core/DataTable/Filter/Sort.php @@ -36,7 +36,7 @@ class Piwik_DataTable_Filter_Sort extends Piwik_DataTable_Filter $this->columnToSort = $columnToSort; $this->naturalSort = $naturalSort; $this->setOrder($order); - $this->filter(); + $this->filter($table); } function setOrder($order) @@ -149,13 +149,13 @@ class Piwik_DataTable_Filter_Sort extends Piwik_DataTable_Filter return $this->columnToSort; } - protected function filter() + protected function filter($table) { - if($this->table instanceof Piwik_DataTable_Simple) + if($table instanceof Piwik_DataTable_Simple) { return; } - $rows = $this->table->getRows(); + $rows = $table->getRows(); if(count($rows) == 0) { return; @@ -183,6 +183,6 @@ class Piwik_DataTable_Filter_Sort extends Piwik_DataTable_Filter $methodToUse = "sortString"; } } - $this->table->sort( array($this,$methodToUse), $this->columnToSort ); + $table->sort( array($this,$methodToUse), $this->columnToSort ); } } |