More adjusted API tests
[dokuwiki.git] / inc / Action / Recent.php
blobf5b45a1acbfb18217a0bf23db78e1dcd3af08152
1 <?php
3 namespace dokuwiki\Action;
5 use dokuwiki\Ui;
7 /**
8 * Class Recent
10 * The recent changes view
12 * @package dokuwiki\Action
14 class Recent extends AbstractAction
16 /** @var string what type of changes to show */
17 protected $showType = 'both';
19 /** @inheritdoc */
20 public function minimumPermission()
22 return AUTH_NONE;
25 /** @inheritdoc */
26 public function preProcess()
28 global $INPUT;
29 $show_changes = $INPUT->str('show_changes');
30 if (!empty($show_changes)) {
31 set_doku_pref('show_changes', $show_changes);
32 $this->showType = $show_changes;
33 } else {
34 $this->showType = get_doku_pref('show_changes', 'both');
38 /** @inheritdoc */
39 public function tplContent()
41 global $INPUT;
42 (new Ui\Recent($INPUT->extract('first')->int('first'), $this->showType))->show();