From ca2cfe106f8bc3d1167902c83bc9f957bb93e018 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 22:20:10 +0000 Subject: [PATCH] ENHANCEMENT: CMS Editor Upload panel now loads the root files directly and allows the user to upload to the root assets dir (from r97601) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102732 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/ThumbnailStripField.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ThumbnailStripField.php b/code/ThumbnailStripField.php index 6cad5859..bd81f7c4 100755 --- a/code/ThumbnailStripField.php +++ b/code/ThumbnailStripField.php @@ -49,15 +49,15 @@ class ThumbnailStripField extends FormField { $whereSQL = '"ParentID" IN (' . implode(', ', $folderList) . ')'; if($searchText) $whereSQL .= " AND \"Filename\" LIKE '%$searchText%'"; - $images = DataObject::get('Image', $whereSQL, 'Title'); } else { + $whereSQL = "\"ParentID\" = 0"; if($searchText) { - $whereSQL = "\"Filename\" LIKE '%$searchText%'"; - - $images = DataObject::get('Image', $whereSQL, 'Title'); + $whereSQL = " AND \"Filename\" LIKE '%$searchText%'"; } + + $images = DataObject::get('Image', $whereSQL, 'Title'); } if($images) {