diff options
author | Eric Wong <e@80x24.org> | 2016-12-17 04:27:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-17 05:41:49 +0000 |
commit | f084e94a4774b95eb45f55fc9f0dfda678522e54 (patch) | |
tree | 9606587e01b4e57b650d1f805b5046611110fbb3 /lib/PublicInbox/Feed.pm | |
parent | 464048b28be5063a3151742feaaa170c9d9e3b19 (diff) | |
download | public-inbox-f084e94a4774b95eb45f55fc9f0dfda678522e54.tar.gz |
feed: support publicinbox.<name>.feedmax
This allows users to customize by using smaller or larger Atom feeds than the default value of 25 entries.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r-- | lib/PublicInbox/Feed.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 31d82adb..2a33fd29 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -8,9 +8,6 @@ use warnings; use Email::MIME; use PublicInbox::View; use PublicInbox::WwwAtomStream; -use constant { - MAX_PER_PAGE => 25, # this needs to be tunable -}; # main function sub generate { @@ -114,7 +111,7 @@ sub new_html_footer { sub each_recent_blob { my ($ctx, $cb) = @_; - my $max = $ctx->{max} || MAX_PER_PAGE; + my $max = $ctx->{-inbox}->{feedmax}; my $hex = '[a-f0-9]'; my $addmsg = qr!^:000000 100644 \S+ \S+ A\t(${hex}{2}/${hex}{38})$!; my $delmsg = qr!^:100644 000000 \S+ \S+ D\t(${hex}{2}/${hex}{38})$!; |