aboutsummaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-08-21 00:51:06 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-08-21 00:51:06 +0200
commitefa1199a1131ced709bf4ec1f38386104b14e0fa (patch)
tree6a393f202c9ca835b1c40e304b9757bbde1fa958 /enter_bug.cgi
parent5a68f0998ca5015c621787b2c8982f2cea03c26d (diff)
downloadbugs-efa1199a1131ced709bf4ec1f38386104b14e0fa.tar
bugs-efa1199a1131ced709bf4ec1f38386104b14e0fa.tar.gz
bugs-efa1199a1131ced709bf4ec1f38386104b14e0fa.tar.bz2
bugs-efa1199a1131ced709bf4ec1f38386104b14e0fa.tar.xz
bugs-efa1199a1131ced709bf4ec1f38386104b14e0fa.zip
Bug 779747: The "Browse" link in the page header/footer doesn't sort products by classification
r=dkl a=LpSolit
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi21
1 files changed, 1 insertions, 20 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index b571f8f44..7a8cebf43 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -25,11 +25,8 @@ use Bugzilla::Constants;
use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Bug;
-use Bugzilla::User;
use Bugzilla::Hook;
-use Bugzilla::Product;
use Bugzilla::Classification;
-use Bugzilla::Keyword;
use Bugzilla::Token;
use Bugzilla::Field;
use Bugzilla::Status;
@@ -67,23 +64,7 @@ if ($product_name eq '') {
my @classifications;
unless ($classification && $classification ne '__all') {
- if (Bugzilla->params->{'useclassification'}) {
- my $class;
- # Get all classifications with at least one enterable product.
- foreach my $product (@enterable_products) {
- $class->{$product->classification_id}->{'object'} ||=
- new Bugzilla::Classification($product->classification_id);
- # Nice way to group products per classification, without querying
- # the DB again.
- push(@{$class->{$product->classification_id}->{'products'}}, $product);
- }
- @classifications = sort {$a->{'object'}->sortkey <=> $b->{'object'}->sortkey
- || lc($a->{'object'}->name) cmp lc($b->{'object'}->name)}
- (values %$class);
- }
- else {
- @classifications = ({object => undef, products => \@enterable_products});
- }
+ @classifications = @{sort_products_by_classification(\@enterable_products)};
}
unless ($classification) {