164ab5140SAndreas Gohr<?php 264ab5140SAndreas Gohr 364ab5140SAndreas Gohrnamespace dokuwiki\Action; 464ab5140SAndreas Gohr 5ab583a1bSAndreas Gohr/** 6ab583a1bSAndreas Gohr * Class Recent 7ab583a1bSAndreas Gohr * 8ab583a1bSAndreas Gohr * The recent changes view 9ab583a1bSAndreas Gohr * 10ab583a1bSAndreas Gohr * @package dokuwiki\Action 11ab583a1bSAndreas Gohr */ 1264ab5140SAndreas Gohrclass Recent extends AbstractAction { 1364ab5140SAndreas Gohr 14*e009a94fSAndreas Gohr /** @var string what type of changes to show */ 15*e009a94fSAndreas Gohr protected $showType = 'both'; 16*e009a94fSAndreas Gohr 1764ab5140SAndreas Gohr /** @inheritdoc */ 18ec701221SAndreas Gohr public function minimumPermission() { 1964ab5140SAndreas Gohr return AUTH_NONE; 2064ab5140SAndreas Gohr } 2164ab5140SAndreas Gohr 2264ab5140SAndreas Gohr /** @inheritdoc */ 2364ab5140SAndreas Gohr public function preProcess() { 2464ab5140SAndreas Gohr global $INPUT; 2564ab5140SAndreas Gohr $show_changes = $INPUT->str('show_changes'); 2664ab5140SAndreas Gohr if(!empty($show_changes)) { 2764ab5140SAndreas Gohr set_doku_pref('show_changes', $show_changes); 28*e009a94fSAndreas Gohr $this->showType = $show_changes; 29*e009a94fSAndreas Gohr } else { 30*e009a94fSAndreas Gohr $this->showType = get_doku_pref('show_changes', 'both'); 3164ab5140SAndreas Gohr } 3264ab5140SAndreas Gohr } 3364ab5140SAndreas Gohr 34ab583a1bSAndreas Gohr /** @inheritdoc */ 3564ab5140SAndreas Gohr public function tplContent() { 3664ab5140SAndreas Gohr global $INPUT; 37*e009a94fSAndreas Gohr html_recent((int) $INPUT->extract('first')->int('first'), $this->showType); 3864ab5140SAndreas Gohr } 3964ab5140SAndreas Gohr 4064ab5140SAndreas Gohr} 41