diff options
author | Eric Wong <e@80x24.org> | 2015-12-24 01:39:45 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-05 18:58:27 +0000 |
commit | 854862946453e829243735e22c6cabc43b47a70c (patch) | |
tree | a42b425a41df4e095ef5c6e91c08fa1e88149539 /lib/PublicInbox | |
parent | 9a36cddfc20432cf0553a87fcc6013c922199146 (diff) | |
download | public-inbox-854862946453e829243735e22c6cabc43b47a70c.tar.gz |
We'll be adding diff support against arbitrary objects, soon (which could cause us to be OOM-ed easily if we're not careful with big objects).
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/RepoBrowseQuery.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepoBrowseQuery.pm b/lib/PublicInbox/RepoBrowseQuery.pm index 979a2b68..861e587b 100644 --- a/lib/PublicInbox/RepoBrowseQuery.pm +++ b/lib/PublicInbox/RepoBrowseQuery.pm @@ -1,16 +1,18 @@ # Copyright (C) 2015 all contributors <meta@public-inbox.org> # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> +# query parameter management for repobrowse package PublicInbox::RepoBrowseQuery; use strict; use warnings; use PublicInbox::Hval; +my @KNOWN_PARAMS = qw(id id2 h showmsg ofs); sub new { my ($class, $cgi) = @_; my $self = bless {}, $class; - foreach my $k (qw(id h showmsg ofs)) { + foreach my $k (@KNOWN_PARAMS) { my $v = $cgi->param($k); $self->{$k} = defined $v ? $v : ''; } @@ -27,7 +29,7 @@ sub qs { } my @qs; - foreach my $k (qw(id h showmsg ofs)) { + foreach my $k (@KNOWN_PARAMS) { my $v = $self->{$k}; next if ($v eq ''); |