FIX revert to this button after archiving

This commit is contained in:
Christopher Joe 2017-10-20 10:01:56 +13:00
parent 9ae6fbffe1
commit a73d5b4177
2 changed files with 2 additions and 3 deletions

View File

@ -1186,7 +1186,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$id = (isset($data['ID'])) ? (int) $data['ID'] : null;
$version = (isset($data['Version'])) ? (int) $data['Version'] : null;
$record = DataObject::get_by_id($this->stat('tree_class'), $id);
$record = Versioned::get_latest_version($this->stat('tree_class'), $id);
if($record && !$record->canEdit()) return Security::permissionFailure($this);
if($version) {

View File

@ -254,8 +254,7 @@
*
* A "rollback" to a specific version needs user confirmation.
*/
$('.cms-edit-form .Actions #Form_EditForm_action_rollback').entwine({
$('.cms-edit-form .Actions #Form_EditForm_action_doRollback').entwine({
/**
* Function: onclick
*