From 2e428770f619545b61deba345bd5431a0571dd6a Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Thu, 14 Feb 2002 09:25:21 +0000 Subject: Bug 110013 - templatize describecomponents.cgi r=gerv, afranke --- bug_form.pl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'bug_form.pl') diff --git a/bug_form.pl b/bug_form.pl index edf6fdfe8..6d52011c7 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -38,6 +38,7 @@ sub bug_form_pl_sillyness { $zz = %::proddesc; $zz = %::prodmaxvotes; $zz = %::versions; + $zz = @::enterable_products; $zz = @::legal_keywords; $zz = @::legal_opsys; $zz = @::legal_platform; @@ -156,20 +157,17 @@ if (defined $URL && $URL ne "none" && $URL ne "NULL" && $URL ne "") { # my (@prodlist, $product_popup); -foreach my $p (sort(keys %::versions)) { +my $seen_currProd = 0; + +foreach my $p (@::enterable_products) { if ($p eq $bug{'product'}) { # if it's the product the bug is already in, it's ALWAYS in # the popup, period, whether the user can see it or not, and # regardless of the disallownew setting. + $seen_currProd = 1; push(@prodlist, $p); next; } - 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)) @@ -182,6 +180,13 @@ foreach my $p (sort(keys %::versions)) { push(@prodlist, $p); } +# The current product is part of the popup, even if new bugs are no longer +# allowed for that product +if (!$seen_currProd) { + push (@prodlist, $bug{'product'}); + @prodlist = sort @prodlist; +} + # If the user has access to multiple products, display a popup, otherwise # display the current product. -- cgit v1.2.3-24-g4f1b