2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2017-10-28 16:00:07 +02:00
parent 9e382a7f1b
commit 00db7e16ec
4 changed files with 8 additions and 3 deletions

View File

@@ -4424,7 +4424,7 @@ abstract class CommonObject
//Eliminate copied source object extra_fields that do not exist in target object
$new_array_options=array();
foreach ($this->array_options as $key => $value) {
if (in_array(substr($key,8), array_keys($target_extrafields)))
if (in_array(substr($key,8), array_keys($target_extrafields))) // We remove the 'options_' from $key
$new_array_options[$key] = $value;
}
@@ -4510,6 +4510,7 @@ abstract class CommonObject
$sql.=",".$attributeKey;
}
$sql .= ") VALUES (".$this->id;
foreach($new_array_options as $key => $value)
{
$attributeKey = substr($key,8); // Remove 'options_' prefix