[Koha-cvs] koha/C4 Biblio.pm [rel_2_2]

Joshua Ferraro jmf at kados.org
Wed Mar 1 06:20:22 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/03/01 05:20:20

Modified files:
	C4             : Biblio.pm 

Log message:
	Repeated tags working now. Indicators next

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

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.115.2.39 koha/C4/Biblio.pm:1.115.2.40
--- koha/C4/Biblio.pm:1.115.2.39	Wed Mar  1 04:52:08 2006
+++ koha/C4/Biblio.pm	Wed Mar  1 05:20:17 2006
@@ -1043,6 +1043,8 @@
         my $prevtag=-1;
         my $first=1;
         for (my $i=0;$i<=@$tags;$i++){
+
+	
             if ((@$tags[$i] ne $prevtag)){
                 if (!$first){
 		    $xml.="</datafield>\n";
@@ -1055,7 +1057,7 @@
 			$xml.="<leader>@$values[$i]</leader>\n";
 			$first=1;
 			# rest of the fixed fields
-		    } elsif (@$tags[$i] lt "010") {
+		    } elsif (@$tags[$i] < 10) {
 			warn "IN THE IF";
 			$xml.="<controlfield tag=\"@$tags[$i]\">@$values[$i]</controlfield>\n";
 			$first=1;
@@ -1071,7 +1073,10 @@
                 if (@$values[$i] eq "") {
                 }
                 else {
-		    
+		if ($first){
+		$xml.="<datafield tag=\"@$tags[$i]\" ind1=\"   \" ind2=\"   \">\n";
+		$first=0;
+		}
 		    $xml.="<subfield code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
 
                 }
@@ -1079,6 +1084,7 @@
             $prevtag = @$tags[$i];
         }
         $xml.= MARC::File::XML::footer();
+	warn $xml;
 	return $xml
 }
 sub MARChtml2marc {
@@ -2977,8 +2983,11 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.115.2.39 2006/03/01 04:52:08 rangi Exp $
+# $Id: Biblio.pm,v 1.115.2.40 2006/03/01 05:20:17 kados Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.115.2.40  2006/03/01 05:20:17  kados
+# Repeated tags working now. Indicators next
+#
 # Revision 1.115.2.39  2006/03/01 04:52:08  rangi
 # More testing
 #





More information about the Koha-cvs mailing list