View | Details | Raw Unified | Return to bug 8136
Collapse All | Expand All

(-)a/misc/migration_tools/rebuild_zebra.pl (-3 / +2 lines)
Lines 602-608 sub fix_unimarc_100 { Link Here
602
    my $marc = shift;
602
    my $marc = shift;
603
603
604
    my $string;
604
    my $string;
605
    if ( length($marc->subfield( 100, "a" )) == 35 ) {
605
    if ( length($marc->subfield( 100, "a" )) == 36 ) {
606
        $string = $marc->subfield( 100, "a" );
606
        $string = $marc->subfield( 100, "a" );
607
        my $f100 = $marc->field(100);
607
        my $f100 = $marc->field(100);
608
        $marc->delete_field($f100);
608
        $marc->delete_field($f100);
Lines 613-619 sub fix_unimarc_100 { Link Here
613
        $string = sprintf( "%-*s", 35, $string );
613
        $string = sprintf( "%-*s", 35, $string );
614
    }
614
    }
615
    substr( $string, 22, 6, "frey50" );
615
    substr( $string, 22, 6, "frey50" );
616
    unless ( length($marc->subfield( 100, "a" )) == 35 ) {
616
    unless ( length($marc->subfield( 100, "a" )) == 36 ) {
617
        $marc->delete_field($marc->field(100));
617
        $marc->delete_field($marc->field(100));
618
        $marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => $string ));
618
        $marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => $string ));
619
    }
619
    }
620
- 

Return to bug 8136