summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-02-26 03:55:41 +0100
committerterry%mozilla.org <>2000-02-26 03:55:41 +0100
commit78dfe401dab8c769f8ff43f26ce0878fc9bcadaa (patch)
tree62e6fc958a96e2bf6705f3d5c64fa38cff2ddc21 /enter_bug.cgi
parent7721a8c4de79d069aafdcbc63b46d34a440a573c (diff)
downloadbugzilla-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-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