From af77343b54dca5a7fcffe07c91e4508976e88b28 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Mon, 10 Oct 2005 10:19:27 +0000 Subject: [PATCH] Bug 311489 Bug entry makes user choose classification even if only one is enterable Patch by Joel Peshkin r=wicked, a=justdave --- enter_bug.cgi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/enter_bug.cgi b/enter_bug.cgi index 00f790de5d..ecded81dfc 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -84,8 +84,17 @@ if (!defined $product || $product eq "") { my %classifications; foreach my $c (GetSelectableClassifications()) { - $classdesc{$c} = $::classdesc{$c}; - $classifications{$c} = $::classifications{$c}; + my $found = 0; + foreach my $p (@enterable_products) { + if (CanEnterProduct($p) + && IsInClassification($c,$p)) { + $found = 1; + } + } + if ($found) { + $classdesc{$c} = $::classdesc{$c}; + $classifications{$c} = $::classifications{$c}; + } } my $classification_size = scalar(keys %classdesc); -- 2.47.2