Cancel.php 460 B

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