koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Chris Cormack
Subject: [Koha-cvs] koha/C4 Biblio.pm [rel_2_2]
Date: Wed, 01 Mar 2006 03:47:15 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Chris Cormack <address@hidden>  06/03/01 03:47:15

Modified files:
        C4             : Biblio.pm 

Log message:
        This may actually work .. hopefully anyway

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

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.115.2.36 koha/C4/Biblio.pm:1.115.2.37
--- koha/C4/Biblio.pm:1.115.2.36        Wed Mar  1 03:09:15 2006
+++ koha/C4/Biblio.pm   Wed Mar  1 03:47:15 2006
@@ -1037,45 +1037,37 @@
     return $record;
 }
 sub MARChtml2xml {
-       my ($tags,$subfields,$values,$indicator,$ind_tag) = @_;
-        
+       my ($tags,$subfields,$values,$indicator,$ind_tag) = @_;        
        my $xml= MARC::File::XML::header();
         my $prevvalue;
         my $prevtag=-1;
         my $first=1;
-
         for (my $i=0;$i<address@hidden;$i++){
-
             if ((@$tags[$i] ne $prevtag) && ($prevtag != -1)){
-                if ($first == 0){
-              $xml.="</datafield>\n";
-                $first=1;
+                if (!$first){
+                   $xml.="</datafield>\n";
+                   $first=1;
                 }
+               else {
+                   # leader
+                   if (@$tags[$i] eq "000") {
+                       $xml.="<leader>@$values[$i]</leader>\n";
+                       $first=1;
+                       # rest of the fixed fields
+                   } elsif (@$tags[$i] lt "010") {
+                       warn "IN THE IF";
+                       $xml.="<controlfield 
tag=\"@$tags[$i]\">@$values[$i]</controlfield>\n";
+                       $first=1;
+                   }
+                   else {
+                       $xml.="<datafield tag=\"@$tags[$i]\" ind1=\"   \" 
ind2=\"   \">\n";
+                       $first=0;                       
+                   }
+               }
             } else {
                 if (@$values[$i] eq "") {
                 }
                 else {
-                    if ($first == 1){
-
-                       # leader
-                       if (@$tags[$i] eq "000") {
-                           $xml.="<leader>@$values[$i]</leader>\n";
-                           $first=1;
-
-                           # rest of the fixed fields
-                       } elsif (@$tags[$i] lt "010") {
-                           warn "IN THE IF";
-                           $xml.="<controlfield 
tag=\"@$tags[$i]\">@$values[$i]</controlfield>\n";
-                           $first=1;
-
-                       # everything else
-                       } else {
-                           warn "NOT CALLED";
-                           warn @$tags[$i];
-                           $xml.="<datafield tag=\"@$tags[$i]\" ind1=\"   \" 
ind2=\"   \">\n";
-                           $first=0;
-                       }
-                    }
                    if (!$first){
                        $xml.="<subfield 
code=\"@$subfields[$i]\">@$values[$i]</subfield>\n";
                    }
@@ -2982,8 +2974,11 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.115.2.36 2006/03/01 03:09:15 rangi Exp $
+# $Id: Biblio.pm,v 1.115.2.37 2006/03/01 03:47:15 rangi Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.115.2.37  2006/03/01 03:47:15  rangi
+# This may actually work .. hopefully anyway
+#
 # Revision 1.115.2.36  2006/03/01 03:09:15  rangi
 # Commiting for joshua to test
 #




reply via email to

[Prev in Thread] Current Thread [Next in Thread]