// performance improve for ObjectModel::displayFieldName #PSCFV-8713
This commit is contained in:
1 parent
ea0203f43f
commit
103513bf28
1 file changed
+3
-3
@@ -940,8 +940,8 @@ abstract class ObjectModelCore
|
|||||||
{
|
{
|
||||||
global $_FIELDS;
|
global $_FIELDS;
|
||||||
|
|
||||||
if (file_exists(_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(_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);
|
$key = $class.'_'.md5($field);
|
||||||
return ((is_array($_FIELDS) && array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $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;
|
$this->update_fields = $fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user