[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5634: BZ5634 order branch list alphabetically, without taking care of uc/lc
Nicole Engard
nengard at bywatersolutions.com
Tue Jan 18 17:19:18 CET 2011
From: Paul Poulain <paul.poulain at biblibre.com>
Perl separates uc & lc in cmp. So we just uc() to have list properly ordered
Signed-off-by: Nicole Engard <nengard at bywatersolutions.com>
---
C4/Branch.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/C4/Branch.pm b/C4/Branch.pm
index db7a87f..1f26e35 100644
--- a/C4/Branch.pm
+++ b/C4/Branch.pm
@@ -160,7 +160,7 @@ sub GetBranchesLoop (;$$) { # since this is what most pages want anyway
my $onlymine = @_ ? shift : onlymine();
my $branches = GetBranches($onlymine);
my @loop;
- foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
+ foreach ( sort { uc($branches->{$a}->{branchname}) cmp uc($branches->{$b}->{branchname}) } keys %$branches ) {
push @loop, {
value => $_,
selected => ($_ eq $branch) ? 1 : 0,
--
1.5.6.5
More information about the Koha-patches
mailing list