mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: fixed site page restoration
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@71250 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5a7b5fd7fa
commit
7a027eb753
@ -413,7 +413,6 @@ JS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$form = new Form($this, "EditForm", $fields, $actions);
|
||||
$form->loadDataFrom($record);
|
||||
$form->disableDefaultAction();
|
||||
@ -576,7 +575,7 @@ JS;
|
||||
*/
|
||||
public function revert($urlParams, $form) {
|
||||
$id = (int)$_REQUEST['ID'];
|
||||
$record = Versioned::get_one_by_stage('SiteTree', 'Live', "\"SiteTree_Live\".\"ID\" = {$id}");
|
||||
$record = Versioned::get_one_by_stage('SiteTree', 'Live', "`SiteTree_Live`.`ID` = {$id}");
|
||||
// a user can restore a page without publication rights, as it just adds a new draft state
|
||||
// (this action should just be available when page has been "deleted from draft")
|
||||
if($record && !$record->canEdit()) return Security::permissionFailure($this);
|
||||
|
Loading…
Reference in New Issue
Block a user