Libraries (branches) should be sorted by branchname.

The display sorted by code, resulting in nonsensical order
for the users, who don't know or see the codes.  Note,
this data should come from GetBranchesLoop, when that
function is availabled (from a separate patch).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
Joe Atzberger 2008-12-30 13:50:15 -06:00 committed by Henri-Damien LAURENT
parent 98a1ea38dd
commit 05ca641611
1 changed files with 6 additions and 5 deletions

View File

@ -116,11 +116,12 @@ if (C4::Context->preference('TagsEnabled')) {
# load the branches
my $branches = GetBranches();
my @branch_loop;
for my $branch_hash (sort keys %$branches) {
push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, };
}
# FIXME: next line duplicates GetBranchesLoop(0,0);
my @branch_loop = map {
{value => $_, branchname => $branches->{$_}->{branchname}}
} sort {
$branches->{$a}->{branchname} cmp $branches->{$b}->{branchname}
} keys %$branches;
my $categories = GetBranchCategories(undef,'searchdomain');