Diff.php 746 B

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