From 5496ff55c0984d414f6f68328ab67279838dd310 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 31 Jan 2023 01:06:41 +0100 Subject: [PATCH] Initialize Tpl lib in CLI mode to allow handling templates files messages translation --- includes/templates.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/templates.php b/includes/templates.php index 12daf1a..7e53c46 100644 --- a/includes/templates.php +++ b/includes/templates.php @@ -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