1<?php 2 3namespace dokuwiki\Action; 4 5use dokuwiki\Ui; 6 7/** 8 * Class Recent 9 * 10 * The recent changes view 11 * 12 * @package dokuwiki\Action 13 */ 14class Recent extends AbstractAction 15{ 16 /** @var string what type of changes to show */ 17 protected $showType = 'both'; 18 19 /** @inheritdoc */ 20 public function minimumPermission() 21 { 22 return AUTH_NONE; 23 } 24 25 /** @inheritdoc */ 26 public function preProcess() 27 { 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'); 35 } 36 } 37 38 /** @inheritdoc */ 39 public function tplContent() 40 { 41 global $INPUT; 42 (new Ui\Recent($INPUT->extract('first')->int('first'), $this->showType))->show(); 43 } 44} 45