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