leader must be 25 and not 24 char long
authorPaul POULAIN <paul@koha-fr.org>
Tue, 6 Nov 2007 17:55:43 +0000 (11:55 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 7 Nov 2007 14:16:40 +0000 (08:16 -0600)
The test was wrong, thus any leader defined by the library was discarded
(chris/kados : check for MARC21 that size should be 25 as in UNIMARC)

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Biblio.pm

index 810de2f..d5a01a1 100644 (file)
@@ -2310,7 +2310,7 @@ sub TransformHtmlToMarc {
             if($tag < 10){ # no code for theses fields
     # in MARC editor, 000 contains the leader.
                 if ($tag eq '000' ) {
-                    $record->leader($cgi->param($params->[$j+1])) if length($cgi->param($params->[$j+1]))==24;
+                    $record->leader($cgi->param($params->[$j+1])) if length($cgi->param($params->[$j+1]))==25;
     # between 001 and 009 (included)
                 } else {
                     $newfield = MARC::Field->new(
@@ -2347,6 +2347,7 @@ sub TransformHtmlToMarc {
     }
     
     $record->append_fields(@fields);
+    warn "RESULT : ".$record->as_formatted;
     return $record;
 }