xref: /dokuwiki/inc/Action/Cancel.php (revision d868eb89f182718a31113373a6272670bd7f8012)
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 */
148c7c53b0SAndreas Gohrclass Cancel extends AbstractAliasAction
158c7c53b0SAndreas Gohr{
16f21dad39SAndreas Gohr
1779a2d784SGerrit Uitslag    /**
1879a2d784SGerrit Uitslag     * @inheritdoc
1979a2d784SGerrit Uitslag     * @throws ActionAbort
2079a2d784SGerrit Uitslag     */
21*d868eb89SAndreas Gohr    public function preProcess()
22*d868eb89SAndreas Gohr    {
233f5c3c1eSAndreas Gohr        global $ID;
243f5c3c1eSAndreas Gohr        unlock($ID);
253f5c3c1eSAndreas Gohr
26231f749dSAndreas Gohr        // continue with draftdel -> redirect -> show
2758528803SAndreas Gohr        throw new ActionAbort('draftdel');
28f21dad39SAndreas Gohr    }
29f21dad39SAndreas Gohr}
30