// performance improve for ObjectModel::displayFieldName #PSCFV-8713

This commit is contained in:
Rémi Gaillard
2013-04-18 17:12:05 +02:00
parent ea0203f43f
commit 103513bf28
+3 -3
View File
@@ -940,8 +940,8 @@ abstract class ObjectModelCore
{
global $_FIELDS;
if (file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'))
include(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php');
if ($_FIELDS === null && file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'))
include_once(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php');
$key = $class.'_'.md5($field);
return ((is_array($_FIELDS) && array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field);
@@ -1596,4 +1596,4 @@ abstract class ObjectModelCore
{
$this->update_fields = $fields;
}
}
}