From e4e560ab1aff05d0d96159057be6659874301a24 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 23 Sep 2015 13:01:08 +0200 Subject: [PATCH] FilterMatchNot: Do not re-invent the parents implementation of matches() refs #5600 --- library/Icinga/Data/Filter/FilterMatchNot.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/library/Icinga/Data/Filter/FilterMatchNot.php b/library/Icinga/Data/Filter/FilterMatchNot.php index fe9fbb96a..a2a78a4ed 100644 --- a/library/Icinga/Data/Filter/FilterMatchNot.php +++ b/library/Icinga/Data/Filter/FilterMatchNot.php @@ -7,15 +7,6 @@ class FilterMatchNot extends FilterExpression { public function matches($row) { - $expression = (string) $this->expression; - if (strpos($expression, '*') === false) { - return (string) $row->{$this->column} !== $expression; - } else { - $parts = array(); - foreach (preg_split('/\*/', $expression) as $part) { - $parts[] = preg_quote($part); - } - return ! preg_match('/^' . implode('.*', $parts) . '$/', $row->{$this->column}); - } + return !parent::matches($row); } }