mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Adjusted AssetAdmin->getEditForm() to comply with changed javascript - it returns the rendered form now
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92785 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9504fc1d57
commit
2fce8cf06e
@ -291,12 +291,7 @@ HTML;
|
||||
function getEditForm($id = null) {
|
||||
if(!$id) $id = $this->currentPageID();
|
||||
|
||||
if($id && $id != "root") {
|
||||
$record = DataObject::get_by_id("File", $id);
|
||||
} else {
|
||||
$record = singleton("Folder");
|
||||
}
|
||||
|
||||
$record = ($id && $id != "root") ? DataObject::get_by_id("File", $id) : null;
|
||||
if($record && !$record->canView()) return Security::permissionFailure($this);
|
||||
|
||||
if($record) {
|
||||
@ -542,14 +537,13 @@ JS;
|
||||
}
|
||||
|
||||
$p->write();
|
||||
|
||||
mkdir($p->FullPath);
|
||||
chmod($p->FullPath, Filesystem::$file_create_mask);
|
||||
|
||||
|
||||
// Used in TinyMCE inline folder creation
|
||||
if(isset($_REQUEST['returnID'])) {
|
||||
return $p->ID;
|
||||
} else {
|
||||
return $this->returnItemToUser($p);
|
||||
$form = $this->getEditForm($p->ID);
|
||||
return $form->formHtmlContent();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user