diff options
author | Frank Becker <Frank@Frank-Becker.de> | 2012-04-13 00:55:00 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-04-13 00:55:00 +0200 |
commit | 0354373916176c202632a7cb8965b1afd578ab8d (patch) | |
tree | 2772056a15f13febc155aeb5178966fff9e429b4 /config.cgi | |
parent | Bug 741078: Release notes for Bugzilla 4.2.1 (diff) | |
download | bugzilla-0354373916176c202632a7cb8965b1afd578ab8d.tar.gz bugzilla-0354373916176c202632a7cb8965b1afd578ab8d.tar.bz2 bugzilla-0354373916176c202632a7cb8965b1afd578ab8d.zip |
Bug 340439: Include classifications in config.cgi
r/a=LpSolit
Diffstat (limited to 'config.cgi')
-rwxr-xr-x | config.cgi | 12 |
1 files changed, 12 insertions, 0 deletions
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'); |