aboutsummaryrefslogtreecommitdiffstats
path: root/config.cgi
diff options
context:
space:
mode:
authorFrank Becker <Frank@Frank-Becker.de>2012-04-13 00:55:00 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-04-13 00:55:00 +0200
commit0354373916176c202632a7cb8965b1afd578ab8d (patch)
tree2772056a15f13febc155aeb5178966fff9e429b4 /config.cgi
parentd0abf01254d10e296a9d05fe887f42691c15d9dd (diff)
downloadbugs-0354373916176c202632a7cb8965b1afd578ab8d.tar
bugs-0354373916176c202632a7cb8965b1afd578ab8d.tar.gz
bugs-0354373916176c202632a7cb8965b1afd578ab8d.tar.bz2
bugs-0354373916176c202632a7cb8965b1afd578ab8d.tar.xz
bugs-0354373916176c202632a7cb8965b1afd578ab8d.zip
Bug 340439: Include classifications in config.cgi
r/a=LpSolit
Diffstat (limited to 'config.cgi')
-rwxr-xr-xconfig.cgi12
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');