diff options
author | bbaetz%student.usyd.edu.au <> | 2002-02-14 10:25:21 +0100 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-02-14 10:25:21 +0100 |
commit | 2e428770f619545b61deba345bd5431a0571dd6a (patch) | |
tree | 2ed999d63e408655a03e694968bdcad7682165ed /bug_form.pl | |
parent | 9d2a3d8fbc9e4068d21df86083780e908834b187 (diff) | |
download | bugzilla-2e428770f619545b61deba345bd5431a0571dd6a.tar.gz bugzilla-2e428770f619545b61deba345bd5431a0571dd6a.tar.xz |
Bug 110013 - templatize describecomponents.cgi
r=gerv, afranke
Diffstat (limited to 'bug_form.pl')
-rw-r--r-- | bug_form.pl | 19 |
1 files changed, 12 insertions, 7 deletions
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. |