Merge pull request #1112 from djfm/1.6

// take force_compile setting into account in Back-Office
This commit is contained in:
Rémi Gaillard
2013-12-09 01:04:20 -08:00
+4 -3
View File
@@ -28,8 +28,9 @@ global $smarty;
$smarty->debugging = false; $smarty->debugging = false;
$smarty->debugging_ctrl = 'NONE'; $smarty->debugging_ctrl = 'NONE';
/* Smarty should be in compile check mode in the BackOffice */ // Let user choose to force compilation
$smarty->force_compile = false; $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; $smarty->compile_check = true;
function smartyTranslate($params, &$smarty) function smartyTranslate($params, &$smarty)
@@ -80,4 +81,4 @@ function smartyTranslate($params, &$smarty)
} }
return Translate::getAdminTranslation($params['s'], $class, $addslashes, $htmlentities, $sprintf); return Translate::getAdminTranslation($params['s'], $class, $addslashes, $htmlentities, $sprintf);
} }