ENHANCEMENT: CMS Editor Upload panel now loads the root files directly and allows the user to upload to the root assets dir

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@97601 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2010-01-26 20:53:55 +00:00 committed by Sam Minnee
parent 16f9491f94
commit 5a071b4ef6

View File

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