// remove smarty translate addslashes for BO

This commit is contained in:
tDidierjean
2011-11-21 16:53:58 +00:00
parent 8dbc83bb20
commit d30552f535
+4 -6
View File
@@ -32,9 +32,9 @@ function smartyTranslate($params, &$smarty)
global $_LANGADM; global $_LANGADM;
$htmlentities = !isset($params['js']); $htmlentities = !isset($params['js']);
$pdf = isset($params['pdf']); $pdf = isset($params['pdf']);
$addslashes = !isset($params['slashes']); $addslashes = isset($params['slashes']);
if ($pdf) if ($pdf)
{ {
global $_LANGPDF; global $_LANGPDF;
$iso = Context::getContext()->language->iso_code; $iso = Context::getContext()->language->iso_code;
@@ -45,7 +45,7 @@ function smartyTranslate($params, &$smarty)
if (Tools::file_exists_cache($translationsFile)) if (Tools::file_exists_cache($translationsFile))
@include_once($translationsFile); @include_once($translationsFile);
$key = 'PDF'.md5($params['s']); $key = 'PDF'.md5($params['s']);
$lang_array = $_LANGPDF; $lang_array = $_LANGPDF;
@@ -58,8 +58,6 @@ function smartyTranslate($params, &$smarty)
return $msg; return $msg;
} }
$filename = ((!isset($smarty->compiler_object) OR !is_object($smarty->compiler_object->template)) ? $smarty->template_resource : $smarty->compiler_object->template->getTemplateFilepath()); $filename = ((!isset($smarty->compiler_object) OR !is_object($smarty->compiler_object->template)) ? $smarty->template_resource : $smarty->compiler_object->template->getTemplateFilepath());
// 1.5 admin : default filename is .tpl; test is made on dir // 1.5 admin : default filename is .tpl; test is made on dir
$dir_filename = dirname($filename); $dir_filename = dirname($filename);
@@ -73,7 +71,7 @@ function smartyTranslate($params, &$smarty)
// note : this may be modified later // note : this may be modified later
case '.': $class = 'index';break; case '.': $class = 'index';break;
case 'helper' : $class = 'AdminTab';break; case 'helper' : $class = 'AdminTab';break;
default : default :
$class = 'Admin'.ucfirst($dir_filename); $class = 'Admin'.ucfirst($dir_filename);
} }