diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2009-04-03 09:41:53 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2009-04-03 09:41:53 +0400 |
commit | 4c02aee97947b8e267f442816a66b9099913358d (patch) | |
tree | 7916751e658eef18ce8cb99e121c0f3cc1c0f935 /core/DataTable/Filter/AddSummaryRow.php | |
parent | 79100d981642d14fb5313a58ca52a788b4996721 (diff) |
- changing ways of applying filters to a datatable, now $table->filter('Piwik_DataTable_Filter_Sort', array ('nb_visits', 'desc'));
- refs #640 now accurately reporting nb_uniq_visitors in all reports
- adding tests
git-svn-id: http://dev.piwik.org/svn/trunk@1046 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/AddSummaryRow.php')
-rw-r--r-- | core/DataTable/Filter/AddSummaryRow.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/DataTable/Filter/AddSummaryRow.php b/core/DataTable/Filter/AddSummaryRow.php index e98133f026..95b90198e9 100644 --- a/core/DataTable/Filter/AddSummaryRow.php +++ b/core/DataTable/Filter/AddSummaryRow.php @@ -45,9 +45,8 @@ class Piwik_DataTable_Filter_AddSummaryRow extends Piwik_DataTable_Filter protected function filter() { - $filter = new Piwik_DataTable_Filter_Sort($this->table, - $this->columnToSortByBeforeTruncating, - 'desc'); + $this->table->filter('Piwik_DataTable_Filter_Sort', + array( $this->columnToSortByBeforeTruncating, 'desc')); $rows = $this->table->getRows(); $count = $this->table->getRowsCount(); @@ -67,7 +66,7 @@ class Piwik_DataTable_Filter_AddSummaryRow extends Piwik_DataTable_Filter } $newRow->addColumn('label', $this->labelSummaryRow); - $filter = new Piwik_DataTable_Filter_Limit($this->table, 0, $this->startRowToSummarize); + $this->table->filter('Piwik_DataTable_Filter_Limit', array(0, $this->startRowToSummarize)); $this->table->addSummaryRow($newRow); } } |