[Koha-cvs] koha/C4 Biblio.pm

paul poulain paul at koha-fr.org
Tue Jan 10 18:01:29 CET 2006


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch: 	
Changes by:	paul poulain <tipaul at savannah.gnu.org>	06/01/10 17:01:29

Modified files:
	C4             : Biblio.pm 

Log message:
	adding a XMLgetbiblio in Biblio.pm (1st draft, to use with zebra)

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

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.135 koha/C4/Biblio.pm:1.136
--- koha/C4/Biblio.pm:1.135	Fri Jan  6 16:39:37 2006
+++ koha/C4/Biblio.pm	Tue Jan 10 17:01:29 2006
@@ -66,6 +66,7 @@
   &MARCkoha2marcBiblio &MARCmarc2koha
   &MARCkoha2marcItem &MARChtml2marc
   &MARCgetbiblio &MARCgetitem
+  &XMLgetbiblio
   &char_decode
   
   &FindDuplicate
@@ -284,6 +285,26 @@
     return $record;
 }
 
+=head2 $XML = &XMLgetbiblio($dbh,$biblionumber);
+
+=over 4
+
+Returns a raw XML for the biblio $biblionumber.
+
+=cut
+
+sub XMLgetbiblio {
+
+    # Returns MARC::Record of the biblio passed in parameter.
+    my ( $dbh, $biblionumber ) = @_;
+	my $sth = $dbh->prepare('select marcxml,marc from biblioitems where biblionumber=?');
+	$sth->execute($biblionumber);
+	my ($XML,$marc) = $sth->fetchrow;
+# 	my $record =MARC::Record::new_from_usmarc($marc);
+# 	warn "MARC : \n*-************************\n".$record->as_xml."\n*-************************\n";
+    return $XML;
+}
+
 =head2 $MARCrecord = &MARCgetitem($dbh,$biblionumber);
 
 =over 4
@@ -2883,8 +2904,11 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.135 2006/01/06 16:39:37 tipaul Exp $
+# $Id: Biblio.pm,v 1.136 2006/01/10 17:01:29 tipaul Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.136  2006/01/10 17:01:29  tipaul
+# adding a XMLgetbiblio in Biblio.pm (1st draft, to use with zebra)
+#
 # Revision 1.135  2006/01/06 16:39:37  tipaul
 # synch'ing head and rel_2_2 (from 2.2.5, including npl templates)
 # Seems not to break too many things, but i'm probably wrong here.





More information about the Koha-cvs mailing list