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

(-)a/C4/XSLT.pm (-5 / +5 lines)
Lines 38-44 use Encode; Link Here
38
38
39
use vars qw(@ISA @EXPORT);
39
use vars qw(@ISA @EXPORT);
40
40
41
my $engine; #XSLT Handler object
41
my $xslth; #XSLT Handler object
42
my %authval_per_framework;
42
my %authval_per_framework;
43
    # Cache for tagfield-tagsubfield to decode per framework.
43
    # Cache for tagfield-tagsubfield to decode per framework.
44
    # Should be preferably be placed in Koha-core...
44
    # Should be preferably be placed in Koha-core...
Lines 48-55 BEGIN { Link Here
48
    @ISA = qw(Exporter);
48
    @ISA = qw(Exporter);
49
    @EXPORT = qw(
49
    @EXPORT = qw(
50
        &XSLTParse4Display
50
        &XSLTParse4Display
51
        &engine
51
    );
52
    );
52
    $engine=Koha::XSLT_Handler->new( { do_not_return_source => 1 } );
53
    $xslth=Koha::XSLT_Handler->new( { do_not_return_source => 1 } );
53
}
54
}
54
55
55
=head1 NAME
56
=head1 NAME
Lines 255-261 sub XSLTParse4Display { Link Here
255
    #If the xslt should fail, we will return undef (old behavior was
256
    #If the xslt should fail, we will return undef (old behavior was
256
    #raw MARC)
257
    #raw MARC)
257
    #Note that we did set do_not_return_source at object construction
258
    #Note that we did set do_not_return_source at object construction
258
    return $engine->transform($xmlrecord, $xslfilename ); #file or URL
259
    return engine()->transform($xmlrecord, $xslfilename ); #file or URL
259
}
260
}
260
261
261
=head2 buildKohaItemsNamespace
262
=head2 buildKohaItemsNamespace
Lines 349-355 Returns reference to XSLT handler object. Link Here
349
=cut
350
=cut
350
351
351
sub engine {
352
sub engine {
352
    return $engine;
353
    return $xslth;
353
}
354
}
354
355
355
1;
356
1;
356
- 

Return to bug 21101