// Context part 3

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7603 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-12 16:25:27 +00:00
parent 50f9794383
commit 9f7c369d53
16 changed files with 127 additions and 151 deletions
+3 -4
View File
@@ -487,11 +487,10 @@ abstract class ObjectModelCore
return true;
}
static public function displayFieldName($field, $className = __CLASS__, $htmlentities = true)
static public function displayFieldName($field, $className = __CLASS__, $htmlentities = true, $context = null)
{
global $_FIELDS, $cookie;
$iso = strtolower(Language::getIsoById($cookie->id_lang ? (int)$cookie->id_lang : Configuration::get('PS_LANG_DEFAULT')));
@include(_PS_TRANSLATIONS_DIR_.$iso.'/fields.php');
global $_FIELDS;
@include(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php');
$key = $className.'_'.md5($field);
return ((is_array($_FIELDS) AND array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field);