From 9ff307e881992247104b2a60fa37c3a4ceb73225 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Thu, 10 Apr 2008 13:19:08 -0500 Subject: [PATCH] remove hardcoded ccode & loc authorized values from opac-detail. Signed-off-by: Joshua Ferraro --- opac/opac-detail.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 40564726f0..e9394e901d 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -80,6 +80,8 @@ if ( $itemtype ) { $dat->{'imageurl'} = $imgdir."/".$itemtypes->{$itemtype}->{'imageurl'}; $dat->{'description'} = $itemtypes->{$itemtype}->{'description'}; } +my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}); +my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'} ); #coping with subscriptions my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); @@ -121,8 +123,9 @@ for my $itm (@items) { $itm->{datelastseen} = format_date($itm->{datelastseen}); #get collection code description, too - $itm->{'ccode'} = GetAuthorisedValueDesc('','', $itm->{'ccode'} ,'','','CCODE'); - $itm->{'location_description'} = GetAuthorisedValueDesc('','', $itm->{'location'} ,'','','LOC'); + my $ccode= $itm->{'ccode'}; + $itm->{'ccode'} = $collections->{$ccode} if(defined($collections) && exists($collections->{$ccode})); + $itm->{'location_description'} = $shelflocations->{$itm->{'location'} }; $itm->{'imageurl'} = $imgdir."/".$itemtypes->{ $itm->{itype} }->{'imageurl'}; $itm->{'description'} = $itemtypes->{$itemtype}->{'description'}; $itemfields{ccode} = 1 if($itm->{ccode}); -- 2.39.2