[Koha-patches] [PATCH] Bug 2505 adding use warnings and fixing warnings in opac-basket.pl

Chris Cormack chris at bigballofwax.co.nz
Tue May 12 12:28:19 CEST 2009


---
 opac/opac-basket.pl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl
index 154d8af..8edaf8a 100755
--- a/opac/opac-basket.pl
+++ b/opac/opac-basket.pl
@@ -17,6 +17,7 @@
 
 
 use strict;
+use warnings;
 use CGI;
 use C4::Koha;
 use C4::Biblio;
@@ -72,14 +73,16 @@ foreach my $biblionumber ( @bibs ) {
     my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'} );
 
 	for my $itm (@items) {
+	    if ($itm->{'location'}){
 	    $itm->{'location_description'} = $shelflocations->{$itm->{'location'} };
+		}
 	}
 	# COinS format FIXME: for books Only
         my $coins_format;
         my $fmt = substr $record->leader(), 6,2;
         my $fmts;
         $fmts->{'am'} = 'book';
-        $dat->{ocoins_format} => $fmts->{$fmt};
+        $dat->{ocoins_format} = $fmts->{$fmt};
 
     if ( $num % 2 == 1 ) {
         $dat->{'even'} = 1;
-- 
1.5.6.3




More information about the Koha-patches mailing list