Skip to content

Commit

Permalink
Merge pull request #997 from BCLibCoop/master
Browse files Browse the repository at this point in the history
Optionally render RSS unsorted.
  • Loading branch information
splitbrain committed Jan 8, 2015
2 parents 8552954 + 38c6f60 commit 508170c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions inc/parser/handler.php
Expand Up @@ -526,6 +526,7 @@ function rss($match, $state, $pos) {
$p['author'] = (preg_match('/\b(by|author)/',$params));
$p['date'] = (preg_match('/\b(date)/',$params));
$p['details'] = (preg_match('/\b(desc|detail)/',$params));
$p['nosort'] = (preg_match('/\b(nosort)\b/',$params));

if (preg_match('/\b(\d+)([dhm])\b/',$params,$match)) {
$period = array('d' => 86400, 'h' => 3600, 'm' => 60);
Expand Down
2 changes: 2 additions & 0 deletions inc/parser/xhtml.php
Expand Up @@ -1178,6 +1178,8 @@ function rss($url, $params) {
error_reporting($elvl);
}

if($params['nosort']) $feed->enable_order_by_date(false);

//decide on start and end
if($params['reverse']) {
$mod = -1;
Expand Down

0 comments on commit 508170c

Please sign in to comment.