From 6dcc1e8f85ee46b2c7ed76d422523be1e27941c5 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Mar 2014 15:39:57 +0100 Subject: Improve encoding dir in rssListNamespace() --- feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'feed.php') diff --git a/feed.php b/feed.php index 5bf1d2e85..b0187476b 100644 --- a/feed.php +++ b/feed.php @@ -474,7 +474,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( -- cgit v1.2.3 From 477e59988f5e90600b6fdcda7c055ab8ea001e03 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Mar 2014 15:40:31 +0100 Subject: add date sort option for list mode of feed --- feed.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'feed.php') diff --git a/feed.php b/feed.php index b0187476b..2ed2fce79 100644 --- a/feed.php +++ b/feed.php @@ -120,6 +120,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 @@ -131,6 +133,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'); @@ -482,7 +485,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; } -- cgit v1.2.3