mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-09-07 02:01:18 +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');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@ -193,8 +202,11 @@ JS
|
||||
}
|
||||
$processedData = array_reverse($processedData);
|
||||
|
||||
if($data['FolderID'] && $data['FolderID'] != '') $folder = DataObject::get_by_id("Folder", $data['FolderID']);
|
||||
else $folder = singleton('Folder');
|
||||
if(isset($data['FolderID']) && is_numeric($data['FolderID'])) {
|
||||
$folder = DataObject::get_by_id("Folder", $data['FolderID']);
|
||||
} else {
|
||||
$folder = singleton('Folder');
|
||||
}
|
||||
|
||||
foreach($processedFiles as $filePostId => $tmpFile) {
|
||||
if($tmpFile['error'] == UPLOAD_ERR_NO_TMP_DIR) {
|
||||
|
Loading…
Reference in New Issue
Block a user