From 684db15cb430b95feda05de480c95d55c02a1222 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Wed, 8 Mar 2000 06:22:47 +0000 Subject: Patch by Dave Miller -- allow setting of confidentiality when submitting a new bug. --- post_bug.cgi | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index 233280f2b..46843fac5 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -150,12 +150,11 @@ if (exists $::FORM{'bug_status'} && $::FORM{'bug_status'} ne $::unconfirmedstate $::FORM{'everconfirmed'} = 1; } -my $query = "insert into bugs (\n" . join(",\n", @used_fields) . ", -creation_ts ) -values ( +my $query = "INSERT INTO bugs (\n" . join(",\n", @used_fields) . ", +creation_ts, groupset) +VALUES ( "; - foreach my $field (@used_fields) { $query .= SqlQuote($::FORM{$field}) . ",\n"; } @@ -165,7 +164,20 @@ $comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings. $comment =~ s/\r/\n/g; # Get rid of mac-style line endings. $comment = trim($comment); -$query .= "now())\n"; +$query .= "now(), 0"; + +foreach my $b (grep(/^bit-\d*$/, keys %::FORM)) { + if ($::FORM{$b}) { + my $v = substr($b, 4); + $query .= " + $v"; # Carefully written so that the math is + # done by MySQL, which can handle 64-bit math, + # and not by Perl, which I *think* can not. + } +} + + + +$query .= ")\n"; my %ccids; -- cgit v1.2.3-24-g4f1b