xref: /dokuwiki/inc/Menu/Item/Revert.php (revision 3e2fa388693f117b05e78c833043887bdae5578b)
1<?php
2
3namespace dokuwiki\Menu\Item;
4
5class Revert extends AbstractItem {
6
7    /** @inheritdoc */
8    public function __construct() {
9        global $REV;
10        global $INFO;
11        parent::__construct();
12
13        if(!$INFO['ismanager'] || !$REV || !$INFO['writable']) {
14            throw new \RuntimeException('revert not available');
15        }
16        $this->params['rev'] = $REV;
17        $this->params['sectok'] = getSecurityToken();
18        $this->svg = DOKU_BASE . 'lib/images/menu/06-revert_replay.svg';
19    }
20
21}
22