From: Garry Collum Date: Wed, 22 Jul 2009 00:36:15 +0000 (-0400) Subject: Bug 2553: Alphabetization of branches in the catalogue stats report. X-Git-Tag: v3.00.04~338 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;ds=sidebyside;h=9bc02948c1d59f96963ff2374f4a23147f7e9e81;p=koha.git Bug 2553: Alphabetization of branches in the catalogue stats report. Improvement on previous patch by using GetBranchesLoop. Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl index c367cec71a..419193eee0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl @@ -157,7 +157,7 @@ diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 365065fc41..f3b92b3029 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -153,18 +153,6 @@ if ($do_it) { push @authvals, { code => $_, description => $authvals->{$_} }; } - - my $branches=GetBranches(); - my @branchloop; - 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), - branchname => $branches->{$_}->{'branchname'}, - ); - push @branchloop, \%row; - } - my $locations = GetKohaAuthorisedValues("items.location"); my @locations; foreach (sort keys %$locations) { @@ -177,7 +165,7 @@ if ($do_it) { haslccn => $haslccn, hascote => $hascote, CGIItemType => $CGIitemtype, - CGIBranch => \@branchloop, + CGIBranch => GetBranchesLoop(C4::Context->userenv->{'branch'}), locationloop => \@locations, authvals => \@authvals, CGIextChoice => \@mime,