diff options
author | terry%mozilla.org <> | 2000-02-26 03:55:41 +0100 |
---|---|---|
committer | terry%mozilla.org <> | 2000-02-26 03:55:41 +0100 |
commit | 78dfe401dab8c769f8ff43f26ce0878fc9bcadaa (patch) | |
tree | 62e6fc958a96e2bf6705f3d5c64fa38cff2ddc21 /enter_bug.cgi | |
parent | 7721a8c4de79d069aafdcbc63b46d34a440a573c (diff) | |
download | bugzilla-78dfe401dab8c769f8ff43f26ce0878fc9bcadaa.tar.gz bugzilla-78dfe401dab8c769f8ff43f26ce0878fc9bcadaa.tar.xz |
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-x | enter_bug.cgi | 15 |
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 |