Lines 59-70
sub new {
Link Here
|
59 |
push @includes, "$htdocs/$_/$lang/includes"; |
59 |
push @includes, "$htdocs/$_/$lang/includes"; |
60 |
push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; |
60 |
push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; |
61 |
} |
61 |
} |
|
|
62 |
# Do not use template cache if script is called from commandline |
63 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
62 |
my $template = Template->new( |
64 |
my $template = Template->new( |
63 |
{ EVAL_PERL => 1, |
65 |
{ EVAL_PERL => 1, |
64 |
ABSOLUTE => 1, |
66 |
ABSOLUTE => 1, |
65 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
67 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
66 |
COMPILE_EXT => C4::Context->config('template_cache_dir')?'.ttc':'', |
68 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
67 |
COMPILE_DIR => C4::Context->config('template_cache_dir')?C4::Context->config('template_cache_dir'):'',, |
69 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
68 |
INCLUDE_PATH => \@includes, |
70 |
INCLUDE_PATH => \@includes, |
69 |
FILTERS => {}, |
71 |
FILTERS => {}, |
70 |
} |
72 |
} |
71 |
- |
|
|