From 0525b32f0bdf9d284d2e48a7c325655e31eaf7a6 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 19 Jan 2011 21:48:00 +0100 Subject: [PATCH] [SIGNED-OFF] Bug 5634: BZ5634 order branch list alphabetically, without taking care of uc/lc Content-Type: text/plain; charset="utf-8" Perl separates uc & lc in cmp. So we just uc() to have list properly ordered Signed-off-by: Nicole Engard --- 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