mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX #4857 Fixed potential bug where a file would just be uploaded to a random folder, also files can now be uploaded to the assets root properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96993 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
51ad525b69
commit
cb541e6333
@ -174,10 +174,10 @@ JS
|
||||
}
|
||||
|
||||
// get the folder to upload to.
|
||||
if(isset($data['FolderID']) && $data['FolderID'] != "root") {
|
||||
if(isset($data['FolderID']) && $data['FolderID'] && $data['FolderID'] != "root") {
|
||||
$folder = DataObject::get_by_id('Folder', $data['FolderID']);
|
||||
} else {
|
||||
$folder = DataObject::get_one('Folder');
|
||||
$folder = singleton('Folder');
|
||||
}
|
||||
|
||||
foreach($processedFiles as $tmpFile) {
|
||||
|
Loading…
Reference in New Issue
Block a user