Commit 684db15c authored by terry%mozilla.org's avatar terry%mozilla.org

Patch by Dave Miller <dave@intrec.com> -- allow setting of

confidentiality when submitting a new bug.
parent 39e31cfe
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
# Netscape Communications Corporation. All Rights Reserved. # Netscape Communications Corporation. All Rights Reserved.
# #
# Contributor(s): Terry Weissman <terry@mozilla.org> # Contributor(s): Terry Weissman <terry@mozilla.org>
# Dave Miller <dave@intrec.com>
######################################################################## ########################################################################
...@@ -35,11 +36,17 @@ use strict; ...@@ -35,11 +36,17 @@ use strict;
require "CGI.pl"; require "CGI.pl";
# Shut up misguided -w warnings about "used only once": # Shut up misguided -w warnings about "used only once". "use vars" just
use vars @::legal_platform, # doesn't work for me.
@::legal_severity,
@::legal_opsys, sub sillyness {
@::legal_priority; my $zz;
$zz = $::unconfirmedstate;
$zz = @::legal_opsys;
$zz = @::legal_platform;
$zz = @::legal_priority;
$zz = @::legal_severity;
}
if (!defined $::FORM{'product'}) { if (!defined $::FORM{'product'}) {
...@@ -322,6 +329,29 @@ print " ...@@ -322,6 +329,29 @@ print "
"</TEXTAREA><BR></td> "</TEXTAREA><BR></td>
</tr> </tr>
<tr> <tr>
<td></td><td colspan=5>
";
if ($::usergroupset ne '0') {
SendSQL("SELECT bit, description FROM groups " .
"WHERE bit & $::usergroupset != 0 " .
" AND isbuggroup != 0 ORDER BY bit");
while (MoreSQLData()) {
my ($bit, $description) = (FetchSQLData());
print BuildPulldown("bit-$bit",
[["0",
"People not in the \"$description\" group can see this bug"],
["1",
"Only people in the \"$description\" group can see this bug"]],
0);
print "<BR>\n";
}
}
print "
</td>
</tr>
<tr>
<td></td> <td></td>
<td colspan=5> <td colspan=5>
<INPUT TYPE=\"submit\" VALUE=\" Commit \" ONCLICK=\"if (this.form.short_desc.value =='') { alert('Please enter a summary sentence for this bug.'); return false; }\"> <INPUT TYPE=\"submit\" VALUE=\" Commit \" ONCLICK=\"if (this.form.short_desc.value =='') { alert('Please enter a summary sentence for this bug.'); return false; }\">
......
...@@ -150,12 +150,11 @@ if (exists $::FORM{'bug_status'} && $::FORM{'bug_status'} ne $::unconfirmedstate ...@@ -150,12 +150,11 @@ if (exists $::FORM{'bug_status'} && $::FORM{'bug_status'} ne $::unconfirmedstate
$::FORM{'everconfirmed'} = 1; $::FORM{'everconfirmed'} = 1;
} }
my $query = "insert into bugs (\n" . join(",\n", @used_fields) . ", my $query = "INSERT INTO bugs (\n" . join(",\n", @used_fields) . ",
creation_ts ) creation_ts, groupset)
values ( VALUES (
"; ";
foreach my $field (@used_fields) { foreach my $field (@used_fields) {
$query .= SqlQuote($::FORM{$field}) . ",\n"; $query .= SqlQuote($::FORM{$field}) . ",\n";
} }
...@@ -165,7 +164,20 @@ $comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings. ...@@ -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 =~ s/\r/\n/g; # Get rid of mac-style line endings.
$comment = trim($comment); $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; my %ccids;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment