diff --git a/inc/Action/Cancel.php b/inc/Action/Cancel.php index c3e185534d94f97ad7e75e9138b135a7f75cacfe..d4d8277cd3cc3e6e5e11ad9ed6579ae39099b76c 100644 --- a/inc/Action/Cancel.php +++ b/inc/Action/Cancel.php @@ -13,7 +13,11 @@ use dokuwiki\Action\Exception\ActionAbort; */ class Cancel extends AbstractAliasAction { + /** @inheritdoc */ public function preProcess() { + global $ID; + unlock($ID); + // continue with draftdel -> redirect -> show throw new ActionAbort('draftdel'); } diff --git a/inc/Action/Show.php b/inc/Action/Show.php index 6dbe9a15c253755484c7fc384bd4e1e660f46374..a5cb53449e99e6024fd358285985928e4809a8ec 100644 --- a/inc/Action/Show.php +++ b/inc/Action/Show.php @@ -22,6 +22,12 @@ class Show extends AbstractAction { return AUTH_READ; } + /** @inheritdoc */ + public function preProcess() { + global $ID; + unlock($ID); + } + /** @inheritdoc */ public function tplContent() { html_show(); diff --git a/inc/html.php b/inc/html.php index a096102dc73a683c6b497873403a44c1e459b589..fc55ffc1230cef26594e9f36c152d05bbcdfadda 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1804,7 +1804,7 @@ function html_edit(){ $form->addElement(form_makeOpenTag('div', array('class'=>'editButtons'))); $form->addElement(form_makeButton('submit', 'save', $lang['btn_save'], array('id'=>'edbtn__save', 'accesskey'=>'s', 'tabindex'=>'4'))); $form->addElement(form_makeButton('submit', 'preview', $lang['btn_preview'], array('id'=>'edbtn__preview', 'accesskey'=>'p', 'tabindex'=>'5'))); - $form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_cancel'], array('tabindex'=>'6'))); + $form->addElement(form_makeButton('submit', 'cancel', $lang['btn_cancel'], array('tabindex'=>'6'))); $form->addElement(form_makeCloseTag('div')); $form->addElement(form_makeOpenTag('div', array('class'=>'summary'))); $form->addElement(form_makeTextField('summary', $SUM, $lang['summary'], 'edit__summary', 'nowrap', array('size'=>'50', 'tabindex'=>'2')));