diff options
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi index 29c05a0ac..43cdea377 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -182,6 +182,26 @@ if (defined $::COOKIE{'COLUMNLIST'}) { @collist = @::default_column_list; } +my $minvotes; +my $votecolnum; +if (defined $::FORM{'votes'}) { + my $c = trim($::FORM{'votes'}); + if ($c ne "") { + if ($c !~ /^[0-9]*$/) { + print "\n\n<P>The 'At least ___ votes' field must be a simple "; + print "number. You entered \"$c\", which doesn't cut it."; + print "<P>Please click the <B>Back</B> button and try again.\n"; + exit; + } + $minvotes = $c; + if (! (grep {/^votes$/} @collist)) { + push(@collist, 'votes'); + } + $votecolnum = lsearch(\@collist, 'votes'); + } +} + + my $dotweak = defined $::FORM{'tweak'}; if ($dotweak) { @@ -346,6 +366,7 @@ if (defined $::FORM{'changedin'}) { } } + my $ref = $::MFORM{'chfield'}; @@ -531,6 +552,11 @@ while (@row = FetchSQLData()) { # the same group. If they don't, we leave # it alone. } + if (defined $minvotes) { + if ($row[$votecolnum] < $minvotes) { + next; + } + } if (!defined $seen{$bug_id}) { $seen{$bug_id} = 1; $count++; |