[-] BO: improvement of load time

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13986 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-03-08 17:07:52 +00:00
parent 25fe658280
commit 72d1245de5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ class TranslateCore
if (!isset($modules_tabs))
$modules_tabs = Tab::getModuleTabList();
if (!is_array($_LANGADM))
if ($_LANGADM == null)
{
$iso = Context::getContext()->language->iso_code;
include_once(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
@@ -141,7 +141,7 @@ class TranslateCore
$cache_key = $name.'|'.$string.'|'.$source;
if (!isset($lang_cache[$cache_key]))
{
if (!is_array($_MODULES))
if ($_MODULES == null)
return str_replace('"', '"', $string);
// set array key to lowercase for 1.3 compatibility
+2 -2
View File
@@ -44,9 +44,9 @@ function smartyTranslate($params, &$smarty)
else if ($params['pdf'])
return Translate::getPdfTranslation($params['s']);
if (is_array($lang_array) && key_exists($key, $lang_array))
if ($lang_array != null && isset($lang_array[$key]))
$msg = $lang_array[$key];
elseif (is_array($lang_array) && key_exists(Tools::strtolower($key), $lang_array))
elseif ($lang_array != null && isset($lang_array[Tools::strtolower($key)]))
$msg = $lang_array[Tools::strtolower($key)];
else
$msg = $params['s'];