View | Details | Raw Unified | Return to bug 19978
Collapse All | Expand All

(-)a/opac/opac-search.pl (-2 / +4 lines)
Lines 226-232 my $itemtypes = GetItemTypesCategorized; Link Here
226
# add translated_description to itemtypes
226
# add translated_description to itemtypes
227
foreach my $itemtype ( keys %{$itemtypes} ) {
227
foreach my $itemtype ( keys %{$itemtypes} ) {
228
    # Itemtypes search categories don't have (yet) translated descriptions, they are auth values (and could still have no descriptions too BZ 18400)
228
    # Itemtypes search categories don't have (yet) translated descriptions, they are auth values (and could still have no descriptions too BZ 18400)
229
    my $translated_description = Koha::ItemTypes->find( $itemtype )->translated_description;
229
    # If 'iscat' (see ITEMTYPECAT) then there is no itemtype and the description is not translated
230
    my $translated_description = $itemtypes->{$itemtype}->{iscat}
231
      ? $itemtypes->{$itemtype}->{description}
232
      : Koha::ItemTypes->find($itemtype)->translated_description;
230
    $itemtypes->{$itemtype}->{translated_description} = $translated_description || $itemtypes->{$itemtype}->{description} || q{};
233
    $itemtypes->{$itemtype}->{translated_description} = $translated_description || $itemtypes->{$itemtype}->{description} || q{};
231
}
234
}
232
235
233
- 

Return to bug 19978