mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #49 from silverstripe-scienceninjas/story/ssf-94-asset-admin
Story/ssf 94 asset admin
This commit is contained in:
commit
2587a4abee
@ -85,6 +85,15 @@ JS
|
|||||||
CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder');
|
CMSBatchActionHandler::register('delete', 'AssetAdmin_DeleteBatchAction', 'Folder');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the root 'asset' folder CMSFields
|
||||||
|
*
|
||||||
|
* @return FieldList
|
||||||
|
*/
|
||||||
|
public function RootForm() {
|
||||||
|
return $this->getEditForm(singleton('Folder'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the content of the upload iframe. The form is specified by a template.
|
* Show the content of the upload iframe. The form is specified by a template.
|
||||||
*/
|
*/
|
||||||
@ -193,8 +202,11 @@ JS
|
|||||||
}
|
}
|
||||||
$processedData = array_reverse($processedData);
|
$processedData = array_reverse($processedData);
|
||||||
|
|
||||||
if($data['FolderID'] && $data['FolderID'] != '') $folder = DataObject::get_by_id("Folder", $data['FolderID']);
|
if(isset($data['FolderID']) && is_numeric($data['FolderID'])) {
|
||||||
else $folder = singleton('Folder');
|
$folder = DataObject::get_by_id("Folder", $data['FolderID']);
|
||||||
|
} else {
|
||||||
|
$folder = singleton('Folder');
|
||||||
|
}
|
||||||
|
|
||||||
foreach($processedFiles as $filePostId => $tmpFile) {
|
foreach($processedFiles as $filePostId => $tmpFile) {
|
||||||
if($tmpFile['error'] == UPLOAD_ERR_NO_TMP_DIR) {
|
if($tmpFile['error'] == UPLOAD_ERR_NO_TMP_DIR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user