From 9cfecf559d27fe2a29cd3e8d246e069fd30601a9 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Sat, 27 Aug 2011 11:29:18 +0200 Subject: Bug 622487: Product and component mismatch: a product without any component gets components of another product in the Advanced Search page r=mkanat a=LpSolit --- query.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index 93de62b63..43649cc58 100755 --- a/query.cgi +++ b/query.cgi @@ -139,6 +139,9 @@ my %components; my %versions; my %milestones; +# Exclude products with no components. +@selectable_products = grep { scalar @{$_->components} } @selectable_products; + foreach my $product (@selectable_products) { $components{$_->name} = 1 foreach (@{$product->components}); $versions{$_->name} = 1 foreach (@{$product->versions}); -- cgit v1.2.3-24-g4f1b