[Koha-cvs] koha/cataloguing addbiblio.pl [rel_3_0]

Henri-Damien LAURENT laurenthdl at alinto.com
Tue Sep 26 10:26:29 CEST 2006


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Henri-Damien LAURENT <hdl>	06/09/26 08:26:29

Modified files:
	cataloguing    : addbiblio.pl 

Log message:
	BugFixing : pruning some calls to unused MARC*pm packages that would make accent display buggy.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbiblio.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.14.2.3&r2=1.14.2.4

Patches:
Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/cataloguing/addbiblio.pl,v
retrieving revision 1.14.2.3
retrieving revision 1.14.2.4
diff -u -b -r1.14.2.3 -r1.14.2.4
--- addbiblio.pl	20 Sep 2006 13:44:14 -0000	1.14.2.3
+++ addbiblio.pl	26 Sep 2006 08:26:29 -0000	1.14.2.4
@@ -1,6 +1,6 @@
 #!/usr/bin/perl 
 
-# $Id: addbiblio.pl,v 1.14.2.3 2006/09/20 13:44:14 hdl Exp $
+# $Id: addbiblio.pl,v 1.14.2.4 2006/09/26 08:26:29 hdl Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -27,16 +27,11 @@
 use C4::Biblio;
 use C4::Search;
 use C4::Context;
+use MARC::Record;
 use C4::Log;
 use C4::Koha; # XXX subfield_is_koha_internal_p
 use HTML::Template;
-use MARC::File::USMARC;
-use MARC::File::XML('BinaryEncoding'=>'utf8');
-use utf8;
 
-if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
-	MARC::File::XML->default_record_format( 'UNIMARC' );
-}
 use vars qw( $tagslib);
 use vars qw( $authorised_values_sth);
 use vars qw( $is_a_modif );
@@ -460,7 +455,7 @@
 #$record = MARCgetbiblio($dbh,$biblionumber) if ($biblionumber);
 my $dbh = C4::Context->dbh;
 $record=MARCgetbiblio($dbh,$biblionumber) if ($biblionumber);
-
+# warn "record :".$record->as_formatted;
 ($record,$encoding) = MARCfindbreeding($dbh,$breedingid) if ($breedingid);
 
 $is_a_modif=0;
@@ -578,6 +573,7 @@
 	#FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding
 	eval {
     	my $uxml = $record->as_xml;
+    	MARC::Record::default_record_format("UNIMARC") if (C4::Context->preference("marcflavour") eq "UNIMARC"); 
     	my $urecord = MARC::Record::new_from_xml($uxml, 'UTF-8'); 
 		$record = $urecord;
 	};





More information about the Koha-cvs mailing list