Sort legal_values case-insensitively

hinted-selects
Vitaliy Filippov 2014-06-17 17:56:12 +04:00
parent 215ffb36d2
commit 161b5bdb48
2 changed files with 2 additions and 7 deletions

View File

@ -273,7 +273,7 @@ sub get_all
} }
else else
{ {
$t = $a->{$_} cmp $b->{$_}; $t = lc $a->{$_} cmp lc $b->{$_};
} }
return $t if $t; return $t if $t;
} }

View File

@ -847,13 +847,8 @@ sub active_components
my $self = shift; my $self = shift;
if (!defined $self->{active_components}) if (!defined $self->{active_components})
{ {
my $ids = Bugzilla->dbh->selectcol_arrayref(
'SELECT id FROM components WHERE product_id = ?'.
' AND isactive = 1 ORDER BY name', undef, $self->id
);
require Bugzilla::Component; require Bugzilla::Component;
$self->{active_components} = Bugzilla::Component->new_from_list($ids); $self->{active_components} = Bugzilla::Component->match({ product_id => $self->id, isactive => 1 });
} }
return $self->{active_components}; return $self->{active_components};
} }