[Koha-patches] [PATCH] Fix authorised_value '0' problem with last commit on detail.pl
Ryan Higgins
rch at liblime.com
Mon Apr 7 03:39:00 CEST 2008
---
catalogue/detail.pl | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index 3c2bbe8..0eb3304 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -113,9 +113,11 @@ foreach my $item (@items) {
}
#get shelf location and collection code description if they are authorised value.
my $shelflocations = GetKohaAuthorisedValues('items.location',$fw );
- $item->{'location'} = $shelflocations->{$item->{'location'}} if($shelflocations->{$item->{'location'}});
+ my $shelfcode= $item->{'location'};
+ $item->{'location'} = $shelflocations->{$shelfcode} if(defined($shelflocations) && exists($shelflocations->{$shelfcode}));
my $collections = GetKohaAuthorisedValues('items.ccode',$fw );
- $item->{'ccode'} = $collections->{$item->{'ccode'}} if($collections->{$item->{'ccode'}});
+ my $ccode= $item->{'ccode'};
+ $item->{'ccode'} = $collections->{$ccode} if(defined($collections) && exists($collections->{$ccode}));
# checking for holds
my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($item->{itemnumber});
--
1.5.2.1
More information about the Koha-patches
mailing list