summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-06-15 05:02:31 +0200
committerjake%acutex.net <>2001-06-15 05:02:31 +0200
commit4ac17e8c4e5352d33150508b6a994b30d5845a94 (patch)
treed7683f39885fb188f880c471e783fa4c95129b0c /enter_bug.cgi
parentf18f666c70fdc3bcc7d942ce25427c1ac9258b50 (diff)
downloadbugzilla-4ac17e8c4e5352d33150508b6a994b30d5845a94.tar.gz
bugzilla-4ac17e8c4e5352d33150508b6a994b30d5845a94.tar.xz
Checking in the cleaner version of the fix for "No Available Products". This was attached to bug 65311.
Patch by Dave Miller <justdave@syndicomm.com> r= jake@acutex.net
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi30
1 files changed, 15 insertions, 15 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 493dcadd3..62c7fc49c 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -79,7 +79,18 @@ if (!defined $::FORM{'product'}) {
}
push(@prodlist, $p);
}
- if (1 != @prodlist) {
+ if (0 == @prodlist) {
+ print "Content-type: text/html\n\n";
+ PutHeader("No Products Available");
+
+ print "Either no products have been defined to enter bugs against ";
+ print "or you have not been given access to any. Please email ";
+ print "<A HREF=\"mailto:" . Param("maintainer") . "\">";
+ print Param("maintainer") . "</A> if you feel this is in error.<P>\n";
+
+ PutFooter();
+ exit;
+ } elsif (1 < @prodlist) {
print "Content-type: text/html\n\n";
PutHeader("Enter Bug");
@@ -87,20 +98,9 @@ if (!defined $::FORM{'product'}) {
print "a bug.</H2>\n";
print "<table>";
foreach my $p (@prodlist) {
- if (defined $::proddesc{$p} && $::proddesc{$p} eq '0') {
- # Special hack. If we stuffed a "0" into proddesc, that means
- # that disallownew was set for this bug, and so we don't want
- # to allow people to specify that product here.
- next;
- }
- if(Param("usebuggroupsentry")
- && GroupExists($p)
- && !UserInGroup($p)) {
- # If we're using bug groups to restrict entry on products, and
- # this product has a bug group, and the user is not in that
- # group, we don't want to include that product in this list.
- next;
- }
+# removed $::proddesc{$p} eq '0' check and UserInGroup($p) check from here
+# because it's redundant. See the foreach loop above that created @prodlist.
+# 1/13/01 - dave@intrec.com
print "<tr><th align=right valign=top><a href=\"enter_bug.cgi?product=" . url_quote($p) . "\">$p</a>:</th>\n";
if (defined $::proddesc{$p}) {
print "<td valign=top>$::proddesc{$p}</td>\n";