mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00: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 (from r96993)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102705 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cf4fa3a23f
commit
afd8faf567
@ -156,10 +156,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…
x
Reference in New Issue
Block a user