From 8286387d6ea6cc755aa47459a609f60d75d59628 Mon Sep 17 00:00:00 2001 From: "endico%mozilla.org" <> Date: Wed, 19 Apr 2000 09:14:36 +0000 Subject: backing out because this has broken bugzilla.mozilla.org. the choice is no longer given in show_bug.cgi to make bugs confidential. I need to change lounge so it no longer automatically updates. --- enter_bug.cgi | 76 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 35 deletions(-) (limited to 'enter_bug.cgi') diff --git a/enter_bug.cgi b/enter_bug.cgi index 086372d23..f89f2f436 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -250,17 +250,15 @@ PutHeader ("Enter Bug","Enter Bug","This page lets you enter a new bug into Bugz # Modified, -JMR, 2/24,00 # If the usebuggroupsentry parameter is set, we need to check and make sure # that the user has permission to enter a bug against this product. -# Modified, -DDM, 3/11/00 -# added GroupExists check so we don't choke on a groupless product -if(Param("usebuggroupsentry") - && GroupExists($product) - && !UserInGroup($product)) { - print "
\n"; - PutFooter(); - exit; +if(Param("usebuggroupsentry")) { + if(!UserInGroup($product)) { + print "
\n";
+ PutFooter();
+ exit;
+ }
}
# Modified, -JMR, 2/18/00
@@ -273,17 +271,14 @@ if(Param("usebuggroupsentry")
# the database, (2) insert the select box in the giant print statements below,
# and (3) update post_bug.cgi to process the additional input field.
-# Modified, -DDM, 3/11/00
-# Only need the bit here, and not the description. Description is gotten
-# when the select boxes for all the groups this user has access to are read
-# in later on.
# First we get the bit and description for the group.
my $group_bit=0;
+my $group_desc;
if(Param("usebuggroups") && GroupExists($product)) {
- SendSQL("select bit from groups ".
+ SendSQL("select bit, description from groups ".
"where name = ".SqlQuote($product)." ".
"and isbuggroup != 0");
- ($group_bit) = FetchSQLData();
+ ($group_bit, $group_desc) = FetchSQLData();
}
print "
@@ -393,6 +388,33 @@ print "
value_quote(formvalue('comment')) .
"
";
+# In between the Description field and the Submit buttons, we'll put in the
+# select box for the bug group, if necessary.
+# Rather than waste time with another Param check and another database access,
+# $group_bit will only have a non-zero value if we're using bug groups and have
+# one for this product, so I'll check on that instead here. -JMR, 2/18/00
+if($group_bit) {
+ # In addition, we need to handle the possibility that we're coming from
+ # a bookmark template. We'll simply check if we've got a parameter called
+ # groupset passed with a value other than the current bit. If so, then we're
+ # coming from a template, and we don't have group_bit set, so turn it off.
+ my $check0 = (formvalue("groupset",$group_bit) == $group_bit) ? "" : " SELECTED";
+ my $check1 = ($check0 eq "") ? " SELECTED" : "";
+ print "
+