BUGFIX: Fixed bug when user selects no folder and uses the search box it incorrectly doesnt append the where statements (from r97603)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102734 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 22:20:47 +00:00
parent addd1dea0c
commit 0c0c3ed7d4

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');