Commit f18f666c authored by jake%acutex.net's avatar jake%acutex.net

Backing out previous changes as there was a better patch already attached to a different bug

parent 13b1b21d
...@@ -79,13 +79,13 @@ if (!defined $::FORM{'product'}) { ...@@ -79,13 +79,13 @@ if (!defined $::FORM{'product'}) {
} }
push(@prodlist, $p); push(@prodlist, $p);
} }
if (1 != @prodlist) { if (1 != @prodlist) {
print "Content-type: text/html\n\n"; print "Content-type: text/html\n\n";
PutHeader("Enter Bug");
my $bProdFlag = 0; print "<H2>First, you must pick a product on which to enter\n";
my $tableContents = ""; print "a bug.</H2>\n";
print "<table>";
foreach my $p (@prodlist) { foreach my $p (@prodlist) {
if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') { if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') {
# Special hack. If we stuffed a "0" into proddesc, that means # Special hack. If we stuffed a "0" into proddesc, that means
...@@ -93,7 +93,6 @@ if (!defined $::FORM{'product'}) { ...@@ -93,7 +93,6 @@ if (!defined $::FORM{'product'}) {
# to allow people to specify that product here. # to allow people to specify that product here.
next; next;
} }
if(Param("usebuggroupsentry") if(Param("usebuggroupsentry")
&& GroupExists($p) && GroupExists($p)
&& !UserInGroup($p)) { && !UserInGroup($p)) {
...@@ -102,34 +101,16 @@ if (!defined $::FORM{'product'}) { ...@@ -102,34 +101,16 @@ if (!defined $::FORM{'product'}) {
# group, we don't want to include that product in this list. # group, we don't want to include that product in this list.
next; next;
} }
print "<tr><th align=right valign=top><a href=\"enter_bug.cgi?product=" . url_quote($p) . "\">$p</a>:</th>\n";
$bProdFlag = 1;
$tableContents .= "<tr><th align=right valign=top><a href=\"enter_bug.cgi?product=" . url_quote($p) . "\">$p</a>:</th>\n";
if (defined $::proddesc{$p}) { if (defined $::proddesc{$p}) {
$tableContents .= "<td valign=top>$::proddesc{$p}</td>\n"; print "<td valign=top>$::proddesc{$p}</td>\n";
} }
print "</tr>";
$tableContents .= "</tr>";
} }
# display sensible message if no products were found for the user to enter bugs against
if ($bProdFlag) {
PutHeader("Enter Bug");
print "<H2>First, you must pick a product on which to enter a bug.</H2>\n";
print "<table>\n";
print $tableContents;
print "</table>\n"; print "</table>\n";
} else {
PutHeader("Permission Denied");
print "Sorry. There are no products for which you may enter bugs\n";
print "<P>\n";
}
PutFooter(); PutFooter();
exit; exit;
} }
$::FORM{'product'} = $prodlist[0]; $::FORM{'product'} = $prodlist[0];
} }
......
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