[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Biblio.pm [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm [rel_2_2] |
Date: |
Fri, 02 Jun 2006 15:36:18 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <address@hidden> 06/06/02 15:36:18
Modified files:
C4 : Biblio.pm
Log message:
- fixing a small bug in html2marc, when the 1st subfield of a field was
empty, the 2nd could not be filled as the MARC::Field had not been created.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?only_with_tag=rel_2_2&tr1=1.115.2.53&tr2=1.115.2.54&r1=text&r2=text
Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.115.2.53 koha/C4/Biblio.pm:1.115.2.54
--- koha/C4/Biblio.pm:1.115.2.53 Thu May 11 14:55:24 2006
+++ koha/C4/Biblio.pm Fri Jun 2 15:36:18 2006
@@ -26,7 +26,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.115.2.53 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.115.2.54 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v);
};
@ISA = qw(Exporter);
@@ -1056,7 +1056,6 @@
@$values[$i] =~ s/>/>/g;
@$values[$i] =~ s/"/"/g;
@$values[$i] =~ s/'/'/g;
-
if ((@$tags[$i] ne $prevtag)){
$j++ unless (@$tags[$i] eq "");
#warn
"IND:".substr(@$indicator[$j],0,1).substr(@$indicator[$j],1,1)."
"address@hidden;
@@ -1158,7 +1157,11 @@
address@hidden;
} else {
if (length(@$rvalues[$i])>0) {
- $field->add_subfields(@$rsubfields[$i]
=> @$rvalues[$i]);
+ if ($field) {
+
$field->add_subfields(@$rsubfields[$i] => @$rvalues[$i]);
+ } else {
+ $field = MARC::Field->new( (sprintf
"%03s",@$rtags[$i]), substr(address@hidden,0,1),substr(address@hidden,1,1),
@$rsubfields[$i] => @$rvalues[$i]);
+ }
# warn "2=>"address@hidden@$rsubfields[$i]." =
"address@hidden": ".$field->as_formatted;
}
}
@@ -3005,8 +3008,11 @@
=cut
-# $Id: Biblio.pm,v 1.115.2.53 2006/05/11 14:55:24 kados Exp $
+# $Id: Biblio.pm,v 1.115.2.54 2006/06/02 15:36:18 tipaul Exp $
# $Log: Biblio.pm,v $
+# Revision 1.115.2.54 2006/06/02 15:36:18 tipaul
+# - fixing a small bug in html2marc, when the 1st subfield of a field was
empty, the 2nd could not be filled as the MARC::Field had not been created.
+#
# Revision 1.115.2.53 2006/05/11 14:55:24 kados
# MARC::File::XML switched the API in 0.83, this code updates Koha --
# it will break your record editing if you don't upgrade MARC::File::XML
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2],
paul poulain <=