Merge pull request #3141 from hregis/3.7_bug
Fix: reset the current entity
This commit is contained in:
commit
4628c15684
@ -1412,7 +1412,6 @@ abstract class DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$entity=$conf->entity;
|
|
||||||
|
|
||||||
if (is_array($this->module_parts) && ! empty($this->module_parts))
|
if (is_array($this->module_parts) && ! empty($this->module_parts))
|
||||||
{
|
{
|
||||||
@ -1420,6 +1419,7 @@ abstract class DolibarrModules
|
|||||||
{
|
{
|
||||||
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
|
if (is_array($value) && count($value) == 0) continue; // Discard empty arrays
|
||||||
|
|
||||||
|
$entity=$conf->entity; // Reset the current entity
|
||||||
$newvalue = $value;
|
$newvalue = $value;
|
||||||
|
|
||||||
// Serialize array parameters
|
// Serialize array parameters
|
||||||
@ -1431,6 +1431,11 @@ abstract class DolibarrModules
|
|||||||
$newvalue = json_encode($value['data']);
|
$newvalue = json_encode($value['data']);
|
||||||
if (isset($value['entity'])) $entity = $value['entity'];
|
if (isset($value['entity'])) $entity = $value['entity'];
|
||||||
}
|
}
|
||||||
|
else if (isset($value['data']) && !is_array($value['data']))
|
||||||
|
{
|
||||||
|
$newvalue = $value['data'];
|
||||||
|
if (isset($value['entity'])) $entity = $value['entity'];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$newvalue = json_encode($value);
|
$newvalue = json_encode($value);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user