Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit afd8faf56726f382b93c02fc7ee4bb88b19b1991 1 parent cf4fa3a
@chillu chillu authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/AssetAdmin.php
View
4 code/AssetAdmin.php
@@ -156,10 +156,10 @@ function doUpload($data, $form) {
}
// 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) {
Please sign in to comment.
Something went wrong with that request. Please try again.