N°2293 Saves changes in DBObjet::DBUpdate, just before the AfterUpdate call

This will allow to get changes made in ComputeValues, OnUpdate, etc
This commit is contained in:
Pierre Goiffon
2019-09-17 11:59:17 +02:00
parent ffd37d7802
commit 5af33ffe0a
2 changed files with 9 additions and 6 deletions

View File

@@ -56,8 +56,6 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
protected $m_iFormId; // The ID of the form used to edit the object (when in edition mode !)
protected static $iGlobalFormId = 1;
protected $aFieldsMap;
/** @var array attname => currentvalue Persists changes for {@link DBUpdate} */
protected $m_aChanges;
/**
* If true, bypass IsActionAllowedOnAttribute when writing this object
@@ -3733,8 +3731,6 @@ EOF
public function DBUpdate()
{
$this->m_aChanges = $this->ListChanges();
$res = parent::DBUpdate();
$this->SetWarningsAsSessionMessages('update');
@@ -3767,8 +3763,6 @@ EOF
unset($aUpdateReentrance[$sKey]);
}
$this->m_aChanges = array();
return $res;
}