]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
If there is only one project allowing new bugs, don't bother prompting
authorterry%mozilla.org <>
Sat, 26 Feb 2000 02:55:41 +0000 (02:55 +0000)
committerterry%mozilla.org <>
Sat, 26 Feb 2000 02:55:41 +0000 (02:55 +0000)
for which project to use.

enter_bug.cgi

index 9161b4e2b9b35f4a056988ef6e824c41fb19cbd6..0282f75c60a0aae6130c94903ff2cf5c68a2ece5 100755 (executable)
@@ -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