xref: /dokuwiki/inc/Action/Cancel.php (revision 3f5c3c1e89ffbb0fc520fc2faddba9484d3fca22)
1f21dad39SAndreas Gohr<?php
2f21dad39SAndreas Gohr
3f21dad39SAndreas Gohrnamespace dokuwiki\Action;
4f21dad39SAndreas Gohr
5f21dad39SAndreas Gohruse dokuwiki\Action\Exception\ActionAbort;
6f21dad39SAndreas Gohr
7ab583a1bSAndreas Gohr/**
8ab583a1bSAndreas Gohr * Class Cancel
9ab583a1bSAndreas Gohr *
10ab583a1bSAndreas Gohr * Alias for show. Aborts editing
11ab583a1bSAndreas Gohr *
12ab583a1bSAndreas Gohr * @package dokuwiki\Action
13ab583a1bSAndreas Gohr */
14f21dad39SAndreas Gohrclass Cancel extends AbstractAliasAction {
15f21dad39SAndreas Gohr
16*3f5c3c1eSAndreas Gohr    /** @inheritdoc */
17f21dad39SAndreas Gohr    public function preProcess() {
18*3f5c3c1eSAndreas Gohr        global $ID;
19*3f5c3c1eSAndreas Gohr        unlock($ID);
20*3f5c3c1eSAndreas Gohr
21231f749dSAndreas Gohr        // continue with draftdel -> redirect -> show
2258528803SAndreas Gohr        throw new ActionAbort('draftdel');
23f21dad39SAndreas Gohr    }
24f21dad39SAndreas Gohr
25f21dad39SAndreas Gohr}
26