[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: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm [rel_2_2] |
Date: |
Wed, 01 Mar 2006 05:52:34 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Joshua Ferraro <address@hidden> 06/03/01 05:52:33
Modified files:
C4 : Biblio.pm
Log message:
Adds support for indicators (still seems to be buggy in some instances
of repeated tags)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?only_with_tag=rel_2_2&tr1=1.115.2.41&tr2=1.115.2.42&r1=text&r2=text
Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.115.2.41 koha/C4/Biblio.pm:1.115.2.42
--- koha/C4/Biblio.pm:1.115.2.41 Wed Mar 1 05:21:22 2006
+++ koha/C4/Biblio.pm Wed Mar 1 05:52:33 2006
@@ -1042,10 +1042,13 @@
my $prevvalue;
my $prevtag=-1;
my $first=1;
+ my $j = -1;
for (my $i=0;$i<address@hidden;$i++){
-
if ((@$tags[$i] ne $prevtag)){
+ $j++ unless (@$tags[$i] eq "");
+ warn
"IND:".substr(@$indicator[$j],0,1).substr(@$indicator[$j],1,1)."
"address@hidden;
+
if (!$first){
$xml.="</datafield>\n";
$first=1;
@@ -1062,7 +1065,9 @@
$first=1;
}
else {
- $xml.="<datafield tag=\"@$tags[$i]\" ind1=\" \"
ind2=\" \">\n";
+ my $ind1 = substr(@$indicator[$j],0,1);
+ my $ind2 = substr(@$indicator[$j],1,1);
+ $xml.="<datafield tag=\"@$tags[$i]\" ind1=\"$ind1\"
ind2=\"$ind2\">\n";
$xml.="<subfield
code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
$first=0;
}
@@ -1073,7 +1078,9 @@
}
else {
if ($first){
- $xml.="<datafield tag=\"@$tags[$i]\" ind1=\" \" ind2=\"
\">\n";
+ my $ind1 = substr(@$indicator[$j],0,1);
+ my $ind2 = substr(@$indicator[$j],1,1);
+ $xml.="<datafield tag=\"@$tags[$j]\" ind1=\"$ind1\"
ind2=\"$ind2\">\n";
$first=0;
}
$xml.="<subfield
code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
@@ -1083,6 +1090,7 @@
$prevtag = @$tags[$i];
}
$xml.= MARC::File::XML::footer();
+ warn $xml;
return $xml
}
sub MARChtml2marc {
@@ -2981,13 +2989,11 @@
=cut
-# $Id: Biblio.pm,v 1.115.2.41 2006/03/01 05:21:22 kados Exp $
+# $Id: Biblio.pm,v 1.115.2.42 2006/03/01 05:52:33 kados Exp $
# $Log: Biblio.pm,v $
-# Revision 1.115.2.41 2006/03/01 05:21:22 kados
-# get rid of warns
-#
-# Revision 1.115.2.40 2006/03/01 05:20:17 kados
-# Repeated tags working now. Indicators next
+# Revision 1.115.2.42 2006/03/01 05:52:33 kados
+# Adds support for indicators (still seems to be buggy in some instances
+# of repeated tags)
#
# Revision 1.115.2.39 2006/03/01 04:52:08 rangi
# More testing
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/01
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/01
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2],
Joshua Ferraro <=
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/02
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/04
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], paul poulain, 2006/03/08
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/08
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/08
- [Koha-cvs] koha/C4 Biblio.pm [rel_2_2], Joshua Ferraro, 2006/03/08