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

(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 85-91 sub transformMARCXML4XSLT { Link Here
85
                    my ( $letter, $value ) = @$subfield;
85
                    my ( $letter, $value ) = @$subfield;
86
                    # Replace the field value with the authorised value *except* for MARC21/NORMARC field 942$n (suppression in opac)
86
                    # Replace the field value with the authorised value *except* for MARC21/NORMARC field 942$n (suppression in opac)
87
                    if ( !( $tag eq '942' && $subfield->[0] eq 'n' ) || $marcflavour eq 'UNIMARC' ) {
87
                    if ( !( $tag eq '942' && $subfield->[0] eq 'n' ) || $marcflavour eq 'UNIMARC' ) {
88
                        $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib )
88
                        $value = GetAuthorisedValues( $tag, $letter, $value, '', $tagslib )
89
                            if $av->{ $tag }->{ $letter };
89
                            if $av->{ $tag }->{ $letter };
90
                    }
90
                    }
91
                    push( @new_subfields, $letter, $value );
91
                    push( @new_subfields, $letter, $value );
(-)a/t/db_dependent/XSLT.t (-2 / +1 lines)
Lines 38-44 subtest 'transformMARCXML4XSLT tests' => sub { Link Here
38
    plan tests => 1;
38
    plan tests => 1;
39
    my $mock_xslt =  Test::MockModule->new("C4::XSLT");
39
    my $mock_xslt =  Test::MockModule->new("C4::XSLT");
40
    $mock_xslt->mock( getAuthorisedValues4MARCSubfields => sub { return { 942 => { 'n' => 1 } } } );
40
    $mock_xslt->mock( getAuthorisedValues4MARCSubfields => sub { return { 942 => { 'n' => 1 } } } );
41
    $mock_xslt->mock( GetAuthorisedValueDesc => sub { warn "called"; });
41
    $mock_xslt->mock( GetAuthorisedValues=> sub { warn "called"; });
42
    my $record = MARC::Record->new();
42
    my $record = MARC::Record->new();
43
    my $suppress_field = MARC::Field->new( 942, ' ', ' ', n => '1' );
43
    my $suppress_field = MARC::Field->new( 942, ' ', ' ', n => '1' );
44
    $record->append_fields($suppress_field);
44
    $record->append_fields($suppress_field);
45
- 

Return to bug 23035