diff options
author | Tero Kivinen <kivinen@iki.fi> | 2018-10-26 04:26:42 +0300 |
---|---|---|
committer | Phy <git@phy25.com> | 2020-03-09 20:21:11 -0400 |
commit | 68f43bcf6b19ba5d21836c5f2346d3ef1ad66f3f (patch) | |
tree | 283a1e916a57a01849ff168d3ac2dc1a1fa95fcd /feed.php | |
parent | 7a0b5f30c2d63a8e403568877b6f3f07db70bdd6 (diff) | |
download | dokuwiki-68f43bcf6b19ba5d21836c5f2346d3ef1ad66f3f.tar.gz dokuwiki-68f43bcf6b19ba5d21836c5f2346d3ef1ad66f3f.zip |
Implemented only_new option for RSS feed, so you can request RSS feed that contains only new files.
Diffstat (limited to 'feed.php')
-rw-r--r-- | feed.php | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -133,6 +133,8 @@ function rss_parseOptions() { 'items' => array('int', 'num', $conf['recent']), // Boolean, only used in rc mode 'show_minor' => array('bool', 'minor', false), + // Boolean, only used in rc mode + 'only_new' => array('bool', 'onlynewpages', false), // String, only used in list mode 'sort' => array('str', 'sort', 'natural'), // String, only used in search mode @@ -146,6 +148,7 @@ function rss_parseOptions() { $opt['items'] = max(0, (int) $opt['items']); $opt['show_minor'] = (bool) $opt['show_minor']; + $opt['only_new'] = (bool) $opt['only_new']; $opt['sort'] = valid_input_set('sort', array('default' => 'natural', 'date'), $opt); $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none'); @@ -469,6 +472,7 @@ function rssRecentChanges($opt) { $flags = 0; if(!$conf['rss_show_deleted']) $flags += RECENTS_SKIP_DELETED; if(!$opt['show_minor']) $flags += RECENTS_SKIP_MINORS; + if($opt['only_new']) $flags += RECENTS_ONLY_NEW_PAGES; if($opt['content_type'] == 'media' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_CHANGES; if($opt['content_type'] == 'both' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_PAGES_MIXED; |