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.
 
 
 
 
 

27 lines
585 B

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