aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-02-26 02:55:41 +0000
committerterry%mozilla.org <>2000-02-26 02:55:41 +0000
commit78dfe401dab8c769f8ff43f26ce0878fc9bcadaa (patch)
tree62e6fc958a96e2bf6705f3d5c64fa38cff2ddc21 /enter_bug.cgi
parentFixed to cope with new longdescs table. (diff)
downloadbugzilla-78dfe401dab8c769f8ff43f26ce0878fc9bcadaa.tar.gz
bugzilla-78dfe401dab8c769f8ff43f26ce0878fc9bcadaa.tar.bz2
bugzilla-78dfe401dab8c769f8ff43f26ce0878fc9bcadaa.zip
If there is only one project allowing new bugs, don't bother prompting
for which project to use.
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi15
1 files changed, 12 insertions, 3 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 9161b4e2b..0282f75c6 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -44,15 +44,24 @@ use vars @::legal_platform,
if (!defined $::FORM{'product'}) {
GetVersionTable();
- my @prodlist = keys %::versions;
- if ($#prodlist != 0) {
+ my @prodlist;
+ foreach my $p (sort(keys %::versions)) {
+ 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;
+ }
+ push(@prodlist, $p);
+ }
+ if (1 != @prodlist) {
print "Content-type: text/html\n\n";
PutHeader("Enter Bug");
print "<H2>First, you must pick a product on which to enter\n";
print "a bug.</H2>\n";
print "<table>";
- foreach my $p (sort (@prodlist)) {
+ 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