From 0e2e8615a5fa502fe7762628883a6777ccce5884 Mon Sep 17 00:00:00 2001 From: "jake%acutex.net" Date: Thu, 14 Jun 2001 20:02:31 +0000 Subject: [PATCH] Checking in the cleaner version of the fix for "No Available Products". This was attached to bug 65311. Patch by Dave Miller r= jake@acutex.net git-svn-id: svn://10.0.0.236/trunk@97164 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/enter_bug.cgi | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mozilla/webtools/bugzilla/enter_bug.cgi b/mozilla/webtools/bugzilla/enter_bug.cgi index 493dcadd38a..62c7fc49cae 100755 --- a/mozilla/webtools/bugzilla/enter_bug.cgi +++ b/mozilla/webtools/bugzilla/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 ""; + print Param("maintainer") . " if you feel this is in error.

\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.\n"; print ""; 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 "\n"; if (defined $::proddesc{$p}) { print "\n";
$p:$::proddesc{$p}