// Refacto of lang functions (all code moved in Translate class)
This commit is contained in:
@@ -295,19 +295,9 @@ class HelperCore
|
||||
// if the class is extended by a module, use modules/[module_name]/xx.php lang file
|
||||
$currentClass = get_class($this);
|
||||
if (Module::getModuleNameFromClass($currentClass))
|
||||
{
|
||||
$string = str_replace('\'', '\\\'', $string);
|
||||
return Module::findTranslation(Module::$classInModule[$currentClass], $string, $currentClass);
|
||||
}
|
||||
global $_LANGADM;
|
||||
return Translate::getModuleTranslation(Module::$classInModule[$currentClass], $string, $currentClass);
|
||||
|
||||
if ($class == __CLASS__)
|
||||
$class = 'AdminTab';
|
||||
|
||||
$key = md5(str_replace('\'', '\\\'', $string));
|
||||
$str = (key_exists(get_class($this).$key, $_LANGADM)) ? $_LANGADM[get_class($this).$key] : ((key_exists($class.$key, $_LANGADM)) ? $_LANGADM[$class.$key] : $string);
|
||||
$str = $htmlentities ? htmlentities($str, ENT_QUOTES, 'utf-8') : $str;
|
||||
return str_replace('"', '"', ($addslashes ? addslashes($str) : stripslashes($str)));
|
||||
return Translate::getAdminTranslation($string, get_class($this), $addslashes, $htmlentities);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user