mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: fix query error when image search doesn't use legacy search (from r106183)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112491 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e4257b76f5
commit
cd4fecb0ee
@ -84,11 +84,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