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.
 
 
 
 
 

42 lines
768 B

  1. <?php
  2. namespace dokuwiki\Action;
  3. use dokuwiki\Ui\PageDiff;
  4. use dokuwiki\Ui;
  5. /**
  6. * Class Diff
  7. *
  8. * Show the differences between two revisions
  9. *
  10. * @package dokuwiki\Action
  11. */
  12. class Diff extends AbstractAction
  13. {
  14. /** @inheritdoc */
  15. public function minimumPermission()
  16. {
  17. return AUTH_READ;
  18. }
  19. /** @inheritdoc */
  20. public function preProcess()
  21. {
  22. global $INPUT;
  23. // store the selected diff type in cookie
  24. $difftype = $INPUT->str('difftype');
  25. if (!empty($difftype)) {
  26. set_doku_pref('difftype', $difftype);
  27. }
  28. }
  29. /** @inheritdoc */
  30. public function tplContent()
  31. {
  32. global $INFO;
  33. (new PageDiff($INFO['id']))->preference('showIntro', true)->show();
  34. }
  35. }