Skip to content
Snippets Groups Projects
Commit e009a94f authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Honor type setting for recent changes. fixes #2322

parent 6ea61f39
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,9 @@ namespace dokuwiki\Action; ...@@ -11,6 +11,9 @@ namespace dokuwiki\Action;
*/ */
class Recent extends AbstractAction { class Recent extends AbstractAction {
/** @var string what type of changes to show */
protected $showType = 'both';
/** @inheritdoc */ /** @inheritdoc */
public function minimumPermission() { public function minimumPermission() {
return AUTH_NONE; return AUTH_NONE;
...@@ -22,13 +25,16 @@ class Recent extends AbstractAction { ...@@ -22,13 +25,16 @@ class Recent extends AbstractAction {
$show_changes = $INPUT->str('show_changes'); $show_changes = $INPUT->str('show_changes');
if(!empty($show_changes)) { if(!empty($show_changes)) {
set_doku_pref('show_changes', $show_changes); set_doku_pref('show_changes', $show_changes);
$this->showType = $show_changes;
} else {
$this->showType = get_doku_pref('show_changes', 'both');
} }
} }
/** @inheritdoc */ /** @inheritdoc */
public function tplContent() { public function tplContent() {
global $INPUT; global $INPUT;
html_recent((int) $INPUT->extract('first')->int('first')); html_recent((int) $INPUT->extract('first')->int('first'), $this->showType);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment