Bug 17642: Add and use get_descriptions_by_koha_field
[koha.git] / C4 / Search.pm
index 9379eeb..4d5c0ed 100644 (file)
@@ -1850,7 +1850,7 @@ sub searchResults {
 # though it is possible to have different authvals for different fws.
 
     my $shelflocations =
-      { map { $_->authorised_value => $_->lib } Koha::AuthorisedValues->search_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) };
+      { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' } ) };
 
     # get notforloan authorised value list (see $shelflocations  FIXME)
     my $av = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => 'items.notforloan', authorised_value => { not => undef } });