Initialize Tpl lib in CLI mode to allow handling templates files messages translation

This commit is contained in:
Benjamin Renard 2023-01-31 01:06:41 +01:00
parent 0eb2c543f1
commit 5496ff55c0

View file

@ -7,15 +7,15 @@ use EesyPHP\Tpl;
use function EesyPHP\format_size;
if (php_sapi_name() == "cli")
return true;
Tpl :: init(
isset($smarty_templates_dir)?$smarty_templates_dir:null,
isset($smarty_templates_c_dir)?$smarty_templates_c_dir:null,
isset($debug_ajax)?$debug_ajax:false
);
if (php_sapi_name() == "cli")
return true;
// Enable Smarty security
Tpl :: enable_security_mode(
// Allow some functions in IF clauses