diff options
author | dkl%redhat.com <> | 2008-05-14 10:34:24 +0200 |
---|---|---|
committer | dkl%redhat.com <> | 2008-05-14 10:34:24 +0200 |
commit | 28aebb4c3b82abe10b952e86185c5d31fe809e74 (patch) | |
tree | 8fdc6fd64d108bdb0519d3dd22a4f37fe11db9a5 /request.cgi | |
parent | dc57a4117a58ce2c6ef58c5ea37d6ebc6ebc9fd5 (diff) | |
download | bugzilla-28aebb4c3b82abe10b952e86185c5d31fe809e74.tar.gz bugzilla-28aebb4c3b82abe10b952e86185c5d31fe809e74.tar.xz |
Bug 430398: request.cgi does not filter component select list on distinct values - Patch by David Lawrence <dkl@redhat.com> r/a=LpSolit
Diffstat (limited to 'request.cgi')
-rwxr-xr-x | request.cgi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/request.cgi b/request.cgi index c854a1767..cad1f6f53 100755 --- a/request.cgi +++ b/request.cgi @@ -76,6 +76,15 @@ else { $vars->{'products'} = $user->get_selectable_products; $vars->{'types'} = \@types; $vars->{'requests'} = {}; + + my %components; + foreach my $prod (@{$vars->{'products'}}) { + foreach my $comp (@{$prod->components}) { + $components{$comp->name} = 1; + } + } + $vars->{'components'} = [ sort { $a cmp $b } keys %components ]; + $template->process('request/queue.html.tmpl', $vars) || ThrowTemplateError($template->error()); } @@ -307,6 +316,14 @@ sub queue { $vars->{'requests'} = \@requests; $vars->{'types'} = \@types; + my %components; + foreach my $prod (@{$vars->{'products'}}) { + foreach my $comp (@{$prod->components}) { + $components{$comp->name} = 1; + } + } + $vars->{'components'} = [ sort { $a cmp $b } keys %components ]; + # Generate and return the UI (HTML page) from the appropriate template. $template->process("request/queue.html.tmpl", $vars) || ThrowTemplateError($template->error()); |