mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: SSF-124 filter on a value only if this value is not an empty string
This commit is contained in:
parent
bfb81fb89f
commit
3d0566638a
@ -185,7 +185,7 @@ class CMSSiteTreeFilter_Search extends CMSSiteTreeFilter {
|
||||
switch($name) {
|
||||
// Match against URLSegment, Title, MenuTitle & Content
|
||||
case 'Term':
|
||||
$where[] = "\"URLSegment\" LIKE '%$val%' OR \"Title\" LIKE '%$val%' OR \"MenuTitle\" LIKE '%$val%' OR \"Content\" LIKE '%$val%'";
|
||||
if($val) $where[] = "\"URLSegment\" LIKE '%$val%' OR \"Title\" LIKE '%$val%' OR \"MenuTitle\" LIKE '%$val%' OR \"Content\" LIKE '%$val%'";
|
||||
break;
|
||||
// Match against date
|
||||
case 'LastEditedFrom':
|
||||
|
Loading…
Reference in New Issue
Block a user