From e009a94f2aedcf1c70d64e7e13c7cab2d9663e38 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 20 Apr 2018 12:28:32 +0200 Subject: [PATCH] Honor type setting for recent changes. fixes #2322 --- inc/Action/Recent.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/Action/Recent.php b/inc/Action/Recent.php index 4fb3e41544..9273d52c8e 100644 --- a/inc/Action/Recent.php +++ b/inc/Action/Recent.php @@ -11,6 +11,9 @@ */ class Recent extends AbstractAction { + /** @var string what type of changes to show */ + protected $showType = 'both'; + /** @inheritdoc */ public function minimumPermission() { return AUTH_NONE; @@ -22,13 +25,16 @@ public function preProcess() { $show_changes = $INPUT->str('show_changes'); if(!empty($show_changes)) { set_doku_pref('show_changes', $show_changes); + $this->showType = $show_changes; + } else { + $this->showType = get_doku_pref('show_changes', 'both'); } } /** @inheritdoc */ public function tplContent() { global $INPUT; - html_recent((int) $INPUT->extract('first')->int('first')); + html_recent((int) $INPUT->extract('first')->int('first'), $this->showType); } }