From be4d92e74dd0b1c8de85bc08c3c522af2d8d8656 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Wed, 18 Apr 2018 09:13:05 +0000 Subject: feed: respect feedmax, again Gigantic feeds probably make some clients unhappy, clamp it to what it was in the past. Fixes: b9534449ecce2c59 ("view: avoid offset during pagination") --- lib/PublicInbox/View.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 94058ed0..af287b96 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1049,10 +1049,9 @@ sub index_nav { # callback for WwwStream pagination_footer($ctx, '.') } -sub paginate_recent ($) { - my ($ctx) = @_; +sub paginate_recent ($$) { + my ($ctx, $lim) = @_; my $t = $ctx->{qp}->{t} || ''; - my $lim = 200; # this is our window my $opts = { limit => $lim }; my ($after, $before); @@ -1094,7 +1093,7 @@ sub paginate_recent ($) { sub index_topics { my ($ctx) = @_; - my $msgs = paginate_recent($ctx); + my $msgs = paginate_recent($ctx, 200); # 200 is our window if (@$msgs) { walk_thread(thread_results($ctx, $msgs), $ctx, *acc_topic); } -- cgit v1.2.3-24-ge0c7