From b747f9c42e641a7f6845f43d558da0a43bbc23fd Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 27 Aug 2007 05:06:57 +0000 Subject: [PATCH] Moved callPageMethod to leftandmain, so that I can use it in other CMS controllers git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@40907 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 9 --------- code/LeftAndMain.php | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 4bb85a1c..deffecc3 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -1110,15 +1110,6 @@ HTML; $page = DataObject::get_by_id("SiteTree", $_REQUEST['ID']); return $page->testInvitation($data,$form); } - - /** - * Use this as an action handler for custom CMS buttons. - */ - function callPageMethod($data, $form) { - $methodName = $form->buttonClicked()->extraData(); - $record = $this->CurrentPage(); - return $record->$methodName($data, $form); - } /** * Provide the permission codes used by LeftAndMain. diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 8078047d..096784d1 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -765,6 +765,15 @@ JS; function MceRoot() { return MCE_ROOT; } + + /** + * Use this as an action handler for custom CMS buttons. + */ + function callPageMethod($data, $form) { + $methodName = $form->buttonClicked()->extraData(); + $record = $this->CurrentPage(); + return $record->$methodName($data, $form); + } } ?> \ No newline at end of file