From ca40e077b3b45b3da5a4a61eb07c71f123cb47dc Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 15 Jan 2009 15:26:18 -0600 Subject: [PATCH] followup to holds policies - fix itype Overriding items.itype from biblioitems.itemtype is needed only with item-level_itypes is OFF. [LL bug 321] Signed-off-by: Daniel Sweeney Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- reserve/request.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index 874b8b21fa..e5db2f25e5 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -256,10 +256,13 @@ foreach my $biblioitemnumber (@biblioitemnumbers) { my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } ) { my $item = $iteminfos_of->{$itemnumber}; - $item->{itypename} = $itemtypes->{ $item->{itype} }{description}; - $item->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $item->{itype} }{imageurl} ); - $item->{homebranchname} = - $branches->{ $item->{homebranch} }{branchname}; + unless (C4::Context->preference('item-level_itypes')) { + $item->{itype} = $biblioitem->{itemtype}; + } + + $item->{itypename} = $itemtypes->{ $item->{itype} }{description}; + $item->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $item->{itype} }{imageurl} ); + $item->{homebranchname} = $branches->{ $item->{homebranch} }{branchname}; # if the holdingbranch is different than the homebranch, we show the # holdingbranch of the document too