FilterMatchNot: Do not re-invent the parents implementation of matches()
refs #5600
This commit is contained in:
parent
939188be94
commit
e4e560ab1a
|
@ -7,15 +7,6 @@ class FilterMatchNot extends FilterExpression
|
||||||
{
|
{
|
||||||
public function matches($row)
|
public function matches($row)
|
||||||
{
|
{
|
||||||
$expression = (string) $this->expression;
|
return !parent::matches($row);
|
||||||
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});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue