Bug 2553: Fixes the location drop-down alphabetization for the catalog statistics...
authorGarry Collum <gcollum@gmail.com>
Fri, 17 Jul 2009 23:08:15 +0000 (19:08 -0400)
committerGalen Charlton <galen.charlton@liblime.com>
Tue, 21 Jul 2009 01:14:24 +0000 (21:14 -0400)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
reports/catalogue_stats.pl

index 34b649f..365065f 100755 (executable)
@@ -156,7 +156,7 @@ if ($do_it) {
 
        my $branches=GetBranches();
        my @branchloop;
-       foreach (keys %$branches) {
+       foreach (sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches) {
                my $thisbranch = ''; # FIXME: populate $thisbranch to preselect one
                my %row = (branchcode => $_,
                        selected => ($thisbranch eq $_ ? 1 : 0),