From 325ef6fe34f399763cecf27da113746a2207284a Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 17 Nov 2008 21:58:29 +0000 Subject: [PATCH] BUGFIX #3065: Fixed restore page git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66067 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 12a869e0..9962b412 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -578,12 +578,12 @@ JS; public function revert($urlParams, $form) { $id = $_REQUEST['ID']; - $obj = DataObject::get_by_id("SiteTree", $id); + $record = DataObject::get_by_id("SiteTree", $id); if($record && !$record->canEdit()) return Security::permissionFailure($this); - $obj->doRevertToLive(); + $record->doRevertToLive(); - $title = Convert::raw2js($obj->Title); + $title = Convert::raw2js($record->Title); FormResponse::get_page($id); FormResponse::add("$('sitetree').setNodeTitle($id, '$title');"); FormResponse::status_message(sprintf(_t('CMSMain.RESTORED',"Restored '%s' successfully",PR_MEDIUM,'Param %s is a title'),$title),'good');