From: Garry Collum Date: Sun, 2 Aug 2009 02:49:53 +0000 (-0400) Subject: Bug 2553: Alphabetizes branches and item-type drop-down lists in opac-topissues.pl. X-Git-Tag: v3.02.00-alpha~290 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=67085930ca42fea63ab5b9616d42bb87c25889bc;p=koha_ffzg Bug 2553: Alphabetizes branches and item-type drop-down lists in opac-topissues.pl. Signed-off-by: Galen Charlton --- diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index 3371d1ddd2..6b712260c6 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -94,24 +94,12 @@ $template->param(do_it => 1, results_loop => \@results, ); -# load the branches ## again?? -$branches = GetBranches(); -my @branch_loop; -for my $branch_hash (sort keys %$branches ) { - my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst')); - push @branch_loop, - { - value => "$branch_hash", - branchname => $branches->{$branch_hash}->{'branchname'}, - selected => $selected - }; -} -$template->param( branchloop => \@branch_loop, "mylibraryfirst"=>C4::Context->preference("SearchMyLibraryFirst")); +$template->param( branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'})); #doctype $itemtypes = GetItemTypes; my @itemtypeloop; -foreach my $thisitemtype (keys %$itemtypes) { +foreach my $thisitemtype (sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'}} keys %$itemtypes) { my %row =(value => $thisitemtype, description => $itemtypes->{$thisitemtype}->{'description'}, );