Recent.php 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace dokuwiki\Action;
  3. use dokuwiki\Ui;
  4. /**
  5. * Class Recent
  6. *
  7. * The recent changes view
  8. *
  9. * @package dokuwiki\Action
  10. */
  11. class Recent extends AbstractAction
  12. {
  13. /** @var string what type of changes to show */
  14. protected $showType = 'both';
  15. /** @inheritdoc */
  16. public function minimumPermission()
  17. {
  18. return AUTH_NONE;
  19. }
  20. /** @inheritdoc */
  21. public function preProcess()
  22. {
  23. global $INPUT;
  24. $show_changes = $INPUT->str('show_changes');
  25. if (!empty($show_changes)) {
  26. set_doku_pref('show_changes', $show_changes);
  27. $this->showType = $show_changes;
  28. } else {
  29. $this->showType = get_doku_pref('show_changes', 'both');
  30. }
  31. }
  32. /** @inheritdoc */
  33. public function tplContent()
  34. {
  35. global $INPUT;
  36. (new Ui\Recent($INPUT->extract('first')->int('first'), $this->showType))->show();
  37. }
  38. }