Bug 8136 Changes the expected lenght of 100$a in rebuild_zebra.pl

In rebuild_zebra.pl, if we are in "unimarc" ("marcflavour" syspref), the sub "fix_unimarc_100" is called and checks if 100$a lenght is equal to 35.
If it is not the case, the sub inserts the localtime and more, so we loose the datas in reindexing.
The standart lenght is 36.
I have just changed 35 to 36.

Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
christophe croullebois 2012-05-22 13:59:33 +02:00 committed by Paul Poulain
parent 533c4c0f46
commit 082bb5049d

View file

@ -602,7 +602,7 @@ sub fix_unimarc_100 {
my $marc = shift;
my $string;
if ( length($marc->subfield( 100, "a" )) == 35 ) {
if ( length($marc->subfield( 100, "a" )) == 36 ) {
$string = $marc->subfield( 100, "a" );
my $f100 = $marc->field(100);
$marc->delete_field($f100);
@ -613,7 +613,7 @@ sub fix_unimarc_100 {
$string = sprintf( "%-*s", 35, $string );
}
substr( $string, 22, 6, "frey50" );
unless ( length($marc->subfield( 100, "a" )) == 35 ) {
unless ( length($marc->subfield( 100, "a" )) == 36 ) {
$marc->delete_field($marc->field(100));
$marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => $string ));
}