diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-05-26 20:44:02 +0200 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-05-26 20:44:02 +0200 |
commit | e5e6f447ba17ba51957a1228e55fe53d8087776a (patch) | |
tree | f59213d66fcb910725f8fd34def06e89d88e5241 /feed.php | |
parent | b66e5840006078112b8da741b2c612e446afd452 (diff) | |
parent | 8f2758f6b53b11db38d83ea9ad838ed802a6e635 (diff) | |
download | rpg-e5e6f447ba17ba51957a1228e55fe53d8087776a.tar.gz rpg-e5e6f447ba17ba51957a1228e55fe53d8087776a.tar.bz2 |
Merge remote-tracking branch 'origin/master' into trailingcolons
Conflicts:
inc/lang/cs/lang.php
inc/lang/hu/lang.php
Diffstat (limited to 'feed.php')
-rw-r--r-- | feed.php | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -127,6 +127,8 @@ function rss_parseOptions() { 'items' => array('int', 'num', $conf['recent']), // Boolean, only used in rc mode 'show_minor' => array('bool', 'minor', false), + // String, only used in list mode + 'sort' => array('str', 'sort', 'natural'), // String, only used in search mode 'search_query' => array('str', 'q', null), // One of: pages, media, both @@ -138,6 +140,7 @@ function rss_parseOptions() { $opt['items'] = max(0, (int) $opt['items']); $opt['show_minor'] = (bool) $opt['show_minor']; + $opt['sort'] = valid_input_set('sort', array('default' => 'natural', 'date'), $opt); $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none'); @@ -480,7 +483,7 @@ function rssListNamespace($opt) { global $conf; $ns = ':'.cleanID($opt['namespace']); - $ns = str_replace(':', '/', $ns); + $ns = utf8_encodeFN(str_replace(':', '/', $ns)); $data = array(); $search_opts = array( @@ -488,7 +491,7 @@ function rssListNamespace($opt) { 'pagesonly' => true, 'listfiles' => true ); - search($data, $conf['datadir'], 'search_universal', $search_opts, $ns); + search($data, $conf['datadir'], 'search_universal', $search_opts, $ns, $lvl = 1, $opt['sort']); return $data; } |