mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Fixed bug when user selects no folder and uses the search box it incorrectly doesnt append the where statements
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@97603 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e9cd3eba62
commit
4a90c3e96f
@ -54,7 +54,7 @@ class ThumbnailStripField extends FormField {
|
|||||||
} else {
|
} else {
|
||||||
$whereSQL = "\"ParentID\" = 0";
|
$whereSQL = "\"ParentID\" = 0";
|
||||||
if($searchText) {
|
if($searchText) {
|
||||||
$whereSQL = " AND \"Filename\" LIKE '%$searchText%'";
|
$whereSQL .= " AND \"Filename\" LIKE '%$searchText%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$images = DataObject::get('Image', $whereSQL, 'Title');
|
$images = DataObject::get('Image', $whereSQL, 'Title');
|
||||||
|
Loading…
Reference in New Issue
Block a user