mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Can't upload files to root folder
This commit is contained in:
parent
1f190eb698
commit
7de585103f
@ -202,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