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

(-)a/C4/ZebraIndex.pm (-4 / +5 lines)
Lines 379-386 sub _fix_unimarc_100 { Link Here
379
    my $marc = shift;
379
    my $marc = shift;
380
380
381
    my $string;
381
    my $string;
382
    if ( length( $marc->subfield( 100, "a" ) ) == 36 ) {
382
    my $string = $marc->subfield(100, 'a');
383
        $string = $marc->subfield( 100, "a" );
383
    if ( defined($string) and length($string) == 36 ) {
384
        my $f100 = $marc->field(100);
384
        my $f100 = $marc->field(100);
385
        $marc->delete_field($f100);
385
        $marc->delete_field($f100);
386
    } else {
386
    } else {
Lines 389-395 sub _fix_unimarc_100 { Link Here
389
        $string = sprintf( "%-*s", 35, $string );
389
        $string = sprintf( "%-*s", 35, $string );
390
    }
390
    }
391
    substr( $string, 22, 6, "frey50" );
391
    substr( $string, 22, 6, "frey50" );
392
    unless ( length( $marc->subfield( 100, "a" ) ) == 36 ) {
392
393
    my $sf100a = $marc->subfield(100, 'a');
394
    unless ( defined($sf100a) and length($sf100a) == 36 ) {
393
        $marc->delete_field( $marc->field(100) );
395
        $marc->delete_field( $marc->field(100) );
394
        $marc->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) );
396
        $marc->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) );
395
    }
397
    }
396
- 

Return to bug 13705