diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-22 12:15:41 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-22 12:15:41 +0400 |
commit | fe631813a815510a5a9a96a476deaab9444cb614 (patch) | |
tree | 8c22df40591a16448d0810ef95cdda88b0c31333 /plugins/Actions/API.php | |
parent | f3ff0cf91c2bfc4e1b6f52a81111aa84ce020952 (diff) |
Refs #4200, documented many more filters and modified ColumnCallbackDeleteRow so filter supplied returns true if the row should be deleted (as opposed to the other way around).
Diffstat (limited to 'plugins/Actions/API.php')
-rw-r--r-- | plugins/Actions/API.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 5e15d1b770..28edd3d85d 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -169,7 +169,7 @@ class API extends \Piwik\Plugin\API $dataTable->filter('ColumnCallbackDeleteRow', array( 'nb_hits_following_search', function ($value) { - return $value > 0; + return $value <= 0; } )); } @@ -311,7 +311,7 @@ class API extends \Piwik\Plugin\API array( Metrics::INDEX_SITE_SEARCH_HAS_NO_RESULT, function ($value) { - return $value >= 1; + return $value < 1; } )); $dataTable->deleteRow(DataTable::ID_SUMMARY_ROW); @@ -537,7 +537,7 @@ class API extends \Piwik\Plugin\API */ private function filterNonEntryActions($dataTable) { - $dataTable->filter('ColumnCallbackDeleteRow', array('entry_nb_visits', 'strlen')); + $dataTable->filter('ColumnCallbackDeleteRow', array('entry_nb_visits', function ($visits) { return !strlen($visits); })); } /** @@ -547,7 +547,6 @@ class API extends \Piwik\Plugin\API */ private function filterNonExitActions($dataTable) { - $dataTable->filter('ColumnCallbackDeleteRow', array('exit_nb_visits', 'strlen')); + $dataTable->filter('ColumnCallbackDeleteRow', array('exit_nb_visits', function ($visits) { return !strlen($visits); })); } -} - +}
\ No newline at end of file |