From 7cf7bf6e4591ac09e06cd16ef63d227895e48ac7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Feb 2018 16:26:23 +0100 Subject: [PATCH] Code comment --- htdocs/core/class/commonobject.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 990d158af56..f5e429bf54a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4673,12 +4673,13 @@ abstract class CommonObject $algo=reset(array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options'])); if ($algo != '') { + //global $action; // $action may be 'create', 'update', 'update_extras'... + //var_dump($action); + //var_dump($this->oldcopy);exit; if (is_object($this->oldcopy)) // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value { - //global $action; // $action may be 'create', 'update', 'update_extras'... - //var_dump($action); //var_dump($this->oldcopy->array_options[$key]); var_dump($this->array_options[$key]); - if ($this->array_options[$key] == $this->oldcopy->array_options[$key]) // If old value crypted in database is same thaan submited new value, it means we don't change it, so we don't update. + if ($this->array_options[$key] == $this->oldcopy->array_options[$key]) // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update. { $new_array_options[$key] = $this->array_options[$key]; // Value is kept }