// Add translate() as deprecated
This commit is contained in:
@@ -223,6 +223,24 @@ function checkPSVersion()
|
||||
return $upgrader->checkPSVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated since > 1.5.4.1
|
||||
* Use Translate::getAdminTranslation($string) instead
|
||||
*
|
||||
* @param string $string
|
||||
*/
|
||||
function translate($string)
|
||||
{
|
||||
Tools::displayAsDeprecated();
|
||||
|
||||
global $_LANGADM;
|
||||
if (!is_array($_LANGADM))
|
||||
return str_replace('"', '"', $string);
|
||||
$key = md5(str_replace('\'', '\\\'', $string));
|
||||
$str = (key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : ((key_exists('index'.$key, $_LANGADM)) ? $_LANGADM['index'.$key] : $string);
|
||||
return str_replace('"', '"', stripslashes($str));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new Tab object
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user