mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: fix query error when image search doesn't use legacy search
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@106183 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b20a69dd04
commit
53646b3187
@ -81,11 +81,13 @@ class ThumbnailStripField extends FormField {
|
||||
|
||||
} else {
|
||||
if (!self::$use_legacy_image_search) {
|
||||
$whereSQL = "\"ParentID\" = 0 AND ";
|
||||
$whereSQL = "\"ParentID\" = 0";
|
||||
} else {
|
||||
$whereSQL = '';
|
||||
}
|
||||
|
||||
if($searchText) {
|
||||
if (!empty($whereSQL)) $whereSQL .= " AND";
|
||||
$whereSQL .= " \"Filename\" LIKE '%$searchText%'";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user