diff --git a/config/smartyadmin.config.inc.php b/config/smartyadmin.config.inc.php index 9f5654082..191095c19 100644 --- a/config/smartyadmin.config.inc.php +++ b/config/smartyadmin.config.inc.php @@ -28,8 +28,9 @@ global $smarty; $smarty->debugging = false; $smarty->debugging_ctrl = 'NONE'; -/* Smarty should be in compile check mode in the BackOffice */ -$smarty->force_compile = false; +// Let user choose to force compilation +$smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false; +// But force compile_check since the performance impact is small and it is better for debugging $smarty->compile_check = true; function smartyTranslate($params, &$smarty) @@ -80,4 +81,4 @@ function smartyTranslate($params, &$smarty) } return Translate::getAdminTranslation($params['s'], $class, $addslashes, $htmlentities, $sprintf); -} \ No newline at end of file +}