Files
mr-legend_wiki/lib/tpl/bootstrap3/compat/inc/Menu/Item/Revert.php
T
2024-07-08 03:32:47 +09:00

27 lines
585 B
PHP

<?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;
parent::__construct();
if(!$REV || !$INFO['writable']) {
throw new \RuntimeException('revert not available');
}
$this->params['rev'] = $REV;
$this->params['sectok'] = getSecurityToken();
$this->svg = DOKU_INC_COMPAT . 'lib/images/menu/06-revert_replay.svg';
}
}