Sort values (#1976)

This commit is contained in:
Christophe Maudoux 2021-01-23 23:20:50 +01:00
parent 377fe4796c
commit 54b9e0d87b

View File

@ -140,8 +140,8 @@ sub buildForm {
$nbr /= 2;
$self->logger->debug(
"Building $key with type 'select' and $nbr entries...");
@$choices = map { { key => $_, value => $hash{$_} } }
sort keys %hash;
@$choices = sort { $a->{value} cmp $b->{value} }
map { { key => $_, value => $hash{$_} } } keys %hash;
{
select => 1,
key => $key,
@ -158,7 +158,7 @@ sub buildForm {
value => $values[0]
};
}
} sort keys %{ $self->conf->{findUserSearchingAttributes} };
} keys %{ $self->conf->{findUserSearchingAttributes} };
return $fields;
}