X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-authorities-home.pl;h=acff077caf08733abf31913961b845bd9c9b4c90;hb=c82d114f1ef6dfc8abc289e01b104e1c4a5d290e;hp=a87030ef98d74b2b1ca7261f3fde24f70a77c928;hpb=b5ee2f201bed91a38ff2c1c527cbf19adc76fabc;p=koha.git diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index a87030ef98..acff077caf 100755 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -41,18 +41,20 @@ $startfrom = 0 if ( !defined $startfrom ); my ( $template, $loggedinuser, $cookie ); my $resultsperpage; -my $authtypes = getauthtypes; -my @authtypesloop; -foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} } - keys %$authtypes ) -{ - my $selected = 1 if $thisauthtype eq $authtypecode; - my %row = ( - value => $thisauthtype, - selected => $selected, - authtypetext => $authtypes->{$thisauthtype}{'authtypetext'}, - ); - push @authtypesloop, \%row; +my $authtypes = getauthtypes(); +my @authtypesloop = (); +foreach my $thisauthtype ( + sort { + $authtypes->{$a}->{'authtypetext'} + cmp $authtypes->{$b}->{'authtypetext'} + } + keys %{$authtypes} + ) { + push @authtypesloop, + { value => $thisauthtype, + selected => $thisauthtype eq $authtypecode, + authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'}, + }; } if ( $op eq "do_search" ) {