xref: /dokuwiki/inc/Action/Cancel.php (revision dccd6b2bba7367e4d1d2d7aa84c9f9d15584b593)
1<?php
2
3namespace dokuwiki\Action;
4
5use dokuwiki\Action\Exception\ActionAbort;
6
7/**
8 * Class Cancel
9 *
10 * Alias for show. Aborts editing
11 *
12 * @package dokuwiki\Action
13 */
14class Cancel extends AbstractAliasAction
15{
16
17    /**
18     * @inheritdoc
19     * @throws ActionAbort
20     */
21    public function preProcess()
22    {
23        global $ID;
24        unlock($ID);
25
26        // continue with draftdel -> redirect -> show
27        throw new ActionAbort('draftdel');
28    }
29}
30