Skip to content

Commit

Permalink
BUGFIX Defaulting to current page ID in CMSMain->EditForm()
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92757 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent 8b88bb7 commit e22fdb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/CMSMain.php
Expand Up @@ -313,6 +313,8 @@ public function getEditForm($id = null) {
// Include JavaScript to ensure HtmlEditorField works.
HtmlEditorField::include_js();

if(!$id) $id = $this->currentPageID();

$record = ($id) ? $this->getRecord($id) : null;
if($record && !$record->canView()) return Security::permissionFailure($this);

Expand Down

0 comments on commit e22fdb9

Please sign in to comment.