[Koha-cvs] koha/C4 Biblio.pm

paul poulain paul at koha-fr.org
Mon Feb 13 17:34:26 CET 2006


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch: 	
Changes by:	paul poulain <tipaul at savannah.gnu.org>	06/02/13 16:34:26

Modified files:
	C4             : Biblio.pm 

Log message:
	fixing some warnings (perl -w should be quiet)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?tr1=1.136&tr2=1.137&r1=text&r2=text

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.136 koha/C4/Biblio.pm:1.137
--- koha/C4/Biblio.pm:1.136	Tue Jan 10 17:01:29 2006
+++ koha/C4/Biblio.pm	Mon Feb 13 16:34:26 2006
@@ -184,6 +184,7 @@
 sub MARCgettagslib {
     my ( $dbh, $forlibrarian, $frameworkcode ) = @_;
     $frameworkcode = "" unless $frameworkcode;
+    $forlibrarian = 1 unless $forlibrarian;
     my $sth;
     my $libfield = ( $forlibrarian eq 1 ) ? 'liblibrarian' : 'libopac';
 
@@ -262,6 +263,7 @@
 sub MARCfind_marc_from_kohafield {
     my ( $dbh, $kohafield,$frameworkcode ) = @_;
     return 0, 0 unless $kohafield;
+    $frameworkcode='' unless $frameworkcode;
 	my $relations = C4::Context->marcfromkohafield;
 	return ($relations->{$frameworkcode}->{$kohafield}->[0],$relations->{$frameworkcode}->{$kohafield}->[1]);
 }
@@ -278,10 +280,10 @@
 
     # Returns MARC::Record of the biblio passed in parameter.
     my ( $dbh, $biblionumber ) = @_;
-	my $sth = $dbh->prepare('select marcxml from biblioitems where biblionumber=?');
+	my $sth = $dbh->prepare('select marc from biblioitems where biblionumber=?');
 	$sth->execute($biblionumber);
 	my ($marc) = $sth->fetchrow;
-	my $record = MARC::Record::new_from_xml($marc);
+	my $record = MARC::Record::new_from_usmarc($marc);
     return $record;
 }
 
@@ -2904,8 +2906,11 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.136 2006/01/10 17:01:29 tipaul Exp $
+# $Id: Biblio.pm,v 1.137 2006/02/13 16:34:26 tipaul Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.137  2006/02/13 16:34:26  tipaul
+# fixing some warnings (perl -w should be quiet)
+#
 # Revision 1.136  2006/01/10 17:01:29  tipaul
 # adding a XMLgetbiblio in Biblio.pm (1st draft, to use with zebra)
 #





More information about the Koha-cvs mailing list