Skip to content

Commit

Permalink
Code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 23, 2018
1 parent f3e1e81 commit 7cf7bf6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -4673,12 +4673,13 @@ function insertExtraFields($trigger='', $userused=null)
$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
}
Expand Down

0 comments on commit 7cf7bf6

Please sign in to comment.