Fix no-op searches
Depeding on the current filter, Filter::andFilter() may return a new filter object w/ the and filter applied or the and filter is applied to the object itself. The FilterEditor did not make use of the return value of Filter::andFilter() thus resulting in no-op searches in some scenarios.
This commit is contained in:
parent
6661d49bd2
commit
44968266f6
|
@ -228,7 +228,7 @@ class FilterEditor extends AbstractWidget
|
||||||
foreach ($this->searchColumns as $searchColumn) {
|
foreach ($this->searchColumns as $searchColumn) {
|
||||||
$filters[] = Filter::expression($searchColumn, '=', "*$search*");
|
$filters[] = Filter::expression($searchColumn, '=', "*$search*");
|
||||||
}
|
}
|
||||||
$filter->andFilter(new FilterOr($filters));
|
$filter = $filter->andFilter(new FilterOr($filters));
|
||||||
} else {
|
} else {
|
||||||
Notification::error(mt('monitoring', 'Cannot search here'));
|
Notification::error(mt('monitoring', 'Cannot search here'));
|
||||||
return $this;
|
return $this;
|
||||||
|
|
Loading…
Reference in New Issue