mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
3b50f8d3f3
commit
ca2cfe106f
@ -49,16 +49,16 @@ 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) {
|
||||||
$result .= '<ul>';
|
$result .= '<ul>';
|
||||||
|
Loading…
Reference in New Issue
Block a user