From 4a90c3e96f8553131d3f2488c06fb7136bc3142c Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 26 Jan 2010 20:57:37 +0000 Subject: [PATCH] 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 --- code/ThumbnailStripField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ThumbnailStripField.php b/code/ThumbnailStripField.php index bd81f7c4..ed4eb758 100755 --- a/code/ThumbnailStripField.php +++ b/code/ThumbnailStripField.php @@ -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');