Skip to content

Commit

Permalink
In exporting of project's news as RSS (rss_main.php)
Browse files Browse the repository at this point in the history
we had a time limit of 90 days.
Change this so there's no limit by default,
and if you want a limit you can add e.g. ?ndays=90
  • Loading branch information
davidpanderson committed May 2, 2024
1 parent 9464ab7 commit 5ad418b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion html/inc/forum_rss.inc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ function forum_rss($forumid, $userid, $threads_only, $ndays) {
$clause .= " and owner=$userid";
}

$tlimit = time() - $ndays*86400;
if ($ndays) {
$tlimit = time() - $ndays*86400;
} else {
$tlimit = 0;
}

if ($threads_only) {
$q = "$clause and hidden=0 and create_time > $tlimit order by create_time desc";
Expand Down
3 changes: 2 additions & 1 deletion html/user/rss_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
exit;
}

forum_rss($forum->id, 0, 1, 90);
$ndays = get_int('ndays', true);
forum_rss($forum->id, 0, 1, $ndays);
?>

0 comments on commit 5ad418b

Please sign in to comment.