Lines 71-84
sub new {
Link Here
|
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 |
my $template = Template->new( |
73 |
my $template = Template->new( |
74 |
{ EVAL_PERL => 1, |
74 |
{ |
|
|
75 |
EVAL_PERL => 1, |
75 |
ABSOLUTE => 1, |
76 |
ABSOLUTE => 1, |
76 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
77 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
77 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
78 |
LOAD_PLUGINS => [ 'Koha', 'Asset', 'raw' ], |
78 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
79 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
|
|
80 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
79 |
INCLUDE_PATH => \@includes, |
81 |
INCLUDE_PATH => \@includes, |
80 |
FILTERS => {}, |
82 |
FILTERS => {}, |
81 |
ENCODING => 'UTF-8', |
83 |
ENCODING => 'UTF-8', |
82 |
} |
84 |
} |
83 |
) or die Template->error(); |
85 |
) or die Template->error(); |
84 |
my $self = { |
86 |
my $self = { |