diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2010-07-27 04:36:19 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2010-07-27 04:36:19 +0400 |
commit | c202482d0e112fa3474ab22cb36b1fdcc3d7ef70 (patch) | |
tree | 88b4fca5b3a9de8b5a1b3a61f7c718e1c26d0b41 /core/DataTable/Filter/Pattern.php | |
parent | 09a73a248362f5932a46476248be1bf18f78fe5a (diff) |
Fixing bug
git-svn-id: http://dev.piwik.org/svn/trunk@2703 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/Pattern.php')
-rw-r--r-- | core/DataTable/Filter/Pattern.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/DataTable/Filter/Pattern.php b/core/DataTable/Filter/Pattern.php index 1af9014bfe..6132871b7f 100644 --- a/core/DataTable/Filter/Pattern.php +++ b/core/DataTable/Filter/Pattern.php @@ -43,9 +43,9 @@ class Piwik_DataTable_Filter_Pattern extends Piwik_DataTable_Filter /* * Performs case insensitive match */ - static public function match($pattern, $patternQuoted, $string) + static public function match($pattern, $patternQuoted, $string, $invertedMatch) { - return @preg_match($patternQuoted . "i", $string) == 1 ^ $this->invertedMatch; + return @preg_match($patternQuoted . "i", $string) == 1 ^ $invertedMatch; } protected function filter() @@ -56,7 +56,7 @@ class Piwik_DataTable_Filter_Pattern extends Piwik_DataTable_Filter // - negative search with -piwik // - exact match with "" // see (?!pattern) A subexpression that performs a negative lookahead search, which matches the search string at any point where a string not matching pattern begins. - if( !self::match($this->patternToSearch, $this->patternToSearchQuoted, $row->getColumn($this->columnToFilter))) + if( !self::match($this->patternToSearch, $this->patternToSearchQuoted, $row->getColumn($this->columnToFilter), $this->invertedMatch)) { $this->table->deleteRow($key); } |