You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace dokuwiki\Menu\Item;
-
- /**
- * Class Revert
- *
- * Quick revert to the currently shown page revision
- */
- class Revert extends AbstractItem
- {
- /** @inheritdoc */
- public function __construct()
- {
- global $REV;
- global $INFO;
- global $INPUT;
- parent::__construct();
-
- if (!$REV || !$INFO['writable'] || $INPUT->server->str('REMOTE_USER') === '') {
- throw new \RuntimeException('revert not available');
- }
- $this->params['rev'] = $REV;
- $this->params['sectok'] = getSecurityToken();
- $this->svg = DOKU_INC . 'lib/images/menu/06-revert_replay.svg';
- }
- }
|