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

(-)a/C4/Templates.pm (+4 lines)
Lines 70-75 sub new { Link Here
70
70
71
    # Do not use template cache if script is called from commandline
71
    # Do not use template cache if script is called from commandline
72
    my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE};
72
    my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE};
73
    use Koha::Template::Plugin::raw;
73
    my $template = Template->new(
74
    my $template = Template->new(
74
        {   EVAL_PERL    => 1,
75
        {   EVAL_PERL    => 1,
75
            ABSOLUTE     => 1,
76
            ABSOLUTE     => 1,
Lines 77-82 sub new { Link Here
77
            COMPILE_EXT => $use_template_cache ? '.ttc' : '',
78
            COMPILE_EXT => $use_template_cache ? '.ttc' : '',
78
            COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '',
79
            COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '',
79
            INCLUDE_PATH => \@includes,
80
            INCLUDE_PATH => \@includes,
81
            LOAD_FILTERS => [
82
                'Koha::Template::Plugin::raw',
83
            ],
80
            FILTERS => {},
84
            FILTERS => {},
81
            ENCODING => 'UTF-8',
85
            ENCODING => 'UTF-8',
82
        }
86
        }
(-)a/Koha/Template/Plugin/raw.pm (-3 / +8 lines)
Lines 17-24 package Koha::Template::Plugin::raw; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Template::Plugin::Filter;
20
use base 'Template::Plugin';
21
use base qw( Template::Plugin::Filter );
22
21
23
our $DYNAMIC = 1;
22
our $DYNAMIC = 1;
24
23
Lines 27-32 sub filter { Link Here
27
    return $text;
26
    return $text;
28
}
27
}
29
28
29
sub fetch {
30
    my ($self) = @_;
31
    return sub {
32
        return shift;
33
    };
34
}
35
30
1;
36
1;
31
37
32
=head1 NAME
38
=head1 NAME
33
- 

Return to bug 38723