diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-16 01:21:15 +0300 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-16 01:21:15 +0300 |
commit | 6600d5ad1827b9a419d1714530caf543386286e0 (patch) | |
tree | 4b05370beb2c695ab5e68b7182a72e6005a8c166 /core/DataTable/Filter/Limit.php | |
parent | 55be7a8ad6cdb7b31125e115933cb27db8c81a65 (diff) |
Fixes #2022
* Introducing 'priority filters' that can be queued from the Controllers directly, and can remove rows from the DataTable returned from the API.
This is for example useful for several Controller views that use a same data source, but are interested in a different subset of this dataset. For example, Exit pages, Entry Pages and Page URLs all use the same DataTable, but Exit pages will only display the rows that have Exits / Exit rate. Therefore they must delete other rows in a filter that is applied before the 'Generic filters' that are Sort, Limit, etc.
git-svn-id: http://dev.piwik.org/svn/trunk@3748 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/Limit.php')
-rw-r--r-- | core/DataTable/Filter/Limit.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/DataTable/Filter/Limit.php b/core/DataTable/Filter/Limit.php index ca4fd39c15..1fbd13b81e 100644 --- a/core/DataTable/Filter/Limit.php +++ b/core/DataTable/Filter/Limit.php @@ -17,7 +17,7 @@ * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_Limit extends Piwik_DataTable_Filter -{ +{ /** * Filter constructor. * @@ -41,6 +41,8 @@ class Piwik_DataTable_Filter_Limit extends Piwik_DataTable_Filter protected function filter() { $table = $this->table; + $table->setRowsCountBeforeLimitFilter(); + $rowsCount = $table->getRowsCount(); // we delete from 0 to offset |