Permalink
Browse files

BUGFIX Defaulting to current page ID in CMSMain->EditForm()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92757 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 8b88bb7 commit e22fdb94ca25379123058b46da8cf8c82ea9a2f9 @chillu chillu committed Nov 21, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 code/CMSMain.php
View
@@ -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);

0 comments on commit e22fdb9

Please sign in to comment.