mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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
This commit is contained in:
parent
555ee1549b
commit
325ef6fe34
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user