mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Using getRecord() in LeftAndMain->getEditForm(), passing through ID request params from getitem()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92844 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8f92ee35fb
commit
0df7de0c6b
@ -352,8 +352,8 @@ class LeftAndMain extends Controller {
|
||||
/**
|
||||
* @deprecated 2.4 Please use show()
|
||||
*/
|
||||
public function getitem() {
|
||||
$form = $this->getEditForm();
|
||||
public function getitem($request) {
|
||||
$form = $this->getEditForm($request->getVar('ID'));
|
||||
if($form) return $form->formHtmlContent();
|
||||
else return "";
|
||||
}
|
||||
@ -748,10 +748,10 @@ JS;
|
||||
|
||||
public function getEditForm($id = null) {
|
||||
if(!$id) $id = $this->currentPageID();
|
||||
|
||||
$record = ($id && $id != "root") ? DataObject::get_by_id($this->stat('tree_class'), $id) : null;
|
||||
|
||||
$record = ($id && $id != "root") ? $this->getRecord($id) : null;
|
||||
if($record && !$record->canView()) return Security::permissionFailure($this);
|
||||
|
||||
|
||||
if($record) {
|
||||
$fields = $record->getCMSFields();
|
||||
if ($fields == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user