https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33039
Marcel de Rooy <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Failed QA --- Comment #14 from Marcel de Rooy <[email protected]> --- + if ( index( $template, '[%' ) != -1 ) { # Much faster than regex No problem, but 'much' sounds like exaggerating :) Just in memory.. The variable name could be confusing btw. It is template code. This call worries me: + my $tt = Template->new( + { + EVAL_PERL => 1, + ABSOLUTE => 1, + PLUGIN_BASE => 'Koha::Template::Plugin', + COMPILE_EXT => $use_template_cache ? '.ttc' : '', + COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', + FILTERS => {}, + ENCODING => 'UTF-8', + } + ) or die Template->error(); Would prefer to see calling something central like in C4::Templates or in C4::Letters instead. + $schema->txn_begin; + try { + my $text; + $tt->process( Please explain why a process call would need a transaction. Can we just remove it ? Could generating alternative text via a Koha plugin be easier somehow? And without needing a db revision ? Note that we already have: Koha/Plugins/Base.pm: $args->{'template'} = Template->new( { ABSOLUTE => 1, ENCODING => 'UTF-8' } ); -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
