summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-10-08 23:41:17 +0200
committerterry%mozilla.org <>1999-10-08 23:41:17 +0200
commitd6c2254cec64f2e8f034cc897bc5c2db674adc81 (patch)
tree8231be49e2f4682def956e66a98ec00419878e32 /buglist.cgi
parent4abcff3783b938ccf9acbb415a9a32c7dffd5c31 (diff)
downloadbugzilla-d6c2254cec64f2e8f034cc897bc5c2db674adc81.tar.gz
bugzilla-d6c2254cec64f2e8f034cc897bc5c2db674adc81.tar.xz
Added ability to query by votes.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi26
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++;