// Context part 3

This commit is contained in:
tDidierjean
2011-07-12 16:25:27 +00:00
parent 286a374353
commit e7ea230525
16 changed files with 127 additions and 151 deletions

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);