From 0354373916176c202632a7cb8965b1afd578ab8d Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Fri, 13 Apr 2012 00:55:00 +0200 Subject: Bug 340439: Include classifications in config.cgi r/a=LpSolit --- config.cgi | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'config.cgi') diff --git a/config.cgi b/config.cgi index 51b33ed7e..891a2f8a3 100755 --- a/config.cgi +++ b/config.cgi @@ -69,6 +69,18 @@ if ($cgi->param('product')) { # We set the 2nd argument to 1 to also preload flag types. Bugzilla::Product::preload($vars->{'products'}, 1); +if (Bugzilla->params->{'useclassification'}) { + my $class = {}; + # Get all classifications with at least one selectable product. + foreach my $product (@{$vars->{'products'}}) { + $class->{$product->classification_id} ||= $product->classification; + } + my @classifications = sort {$a->sortkey <=> $b->sortkey + || lc($a->name) cmp lc($b->name)} (values %$class); + $vars->{'class_names'} = $class; + $vars->{'classifications'} = \@classifications; +} + # Allow consumers to specify whether or not they want flag data. if (defined $cgi->param('flags')) { $vars->{'show_flags'} = $cgi->param('flags'); -- cgit v1.2.3-24-g4f1b