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

(-)a/misc/migration_tools/rebuild_zebra.pl (-3 / +2 lines)
Lines 562-568 sub fix_unimarc_100 { Link Here
562
    my $marc = shift;
562
    my $marc = shift;
563
563
564
    my $string;
564
    my $string;
565
    if ( length($marc->subfield( 100, "a" )) == 35 ) {
565
    if ( length($marc->subfield( 100, "a" )) == 36 ) {
566
        $string = $marc->subfield( 100, "a" );
566
        $string = $marc->subfield( 100, "a" );
567
        my $f100 = $marc->field(100);
567
        my $f100 = $marc->field(100);
568
        $marc->delete_field($f100);
568
        $marc->delete_field($f100);
Lines 573-579 sub fix_unimarc_100 { Link Here
573
        $string = sprintf( "%-*s", 35, $string );
573
        $string = sprintf( "%-*s", 35, $string );
574
    }
574
    }
575
    substr( $string, 22, 6, "frey50" );
575
    substr( $string, 22, 6, "frey50" );
576
    unless ( length($marc->subfield( 100, "a" )) == 35 ) {
576
    unless ( length($marc->subfield( 100, "a" )) == 36 ) {
577
        $marc->delete_field($marc->field(100));
577
        $marc->delete_field($marc->field(100));
578
        $marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => $string ));
578
        $marc->insert_grouped_field(MARC::Field->new( 100, "", "", "a" => $string ));
579
    }
579
    }
580
- 

Return to bug 8136