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
This commit is contained in:
Ingo Schommer 2010-04-13 22:20:10 +00:00
parent 3b50f8d3f3
commit ca2cfe106f

View File

@ -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) {