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:
Will Rossiter 2010-01-26 20:57:37 +00:00 committed by Sam Minnee
parent e9cd3eba62
commit 4a90c3e96f

View File

@ -54,7 +54,7 @@ class ThumbnailStripField extends FormField {
} else {
$whereSQL = "\"ParentID\" = 0";
if($searchText) {
$whereSQL = " AND \"Filename\" LIKE '%$searchText%'";
$whereSQL .= " AND \"Filename\" LIKE '%$searchText%'";
}
$images = DataObject::get('Image', $whereSQL, 'Title');