mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°2163 DB*Tracked methods : modifications after review with Romain
Previous commit : 24eb82d1
Use \CMDBObject::SetTrackInfo
Move \CMDBObject::SetCurrentChange calls at the top most level of the stacks
Restore old behaviors that were removed in previous commit
This commit is contained in:
@@ -434,22 +434,13 @@ abstract class TestBizModel extends TestHandler
|
||||
}
|
||||
protected function ObjectToDB($oNew, $bReload = false)
|
||||
{
|
||||
if ($oNew instanceof CMDBObject)
|
||||
if ($bReload)
|
||||
{
|
||||
$oChange = $this->GetCurrentChange();
|
||||
$oNew::SetCurrentChange($oChange);
|
||||
$oNew->DBWrite();
|
||||
$iId = $oNew->DBInsert();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($bReload)
|
||||
{
|
||||
$iId = $oNew->DBInsert();
|
||||
}
|
||||
else
|
||||
{
|
||||
$iId = $oNew->DBInsertNoReload();
|
||||
}
|
||||
$iId = $oNew->DBInsertNoReload();
|
||||
}
|
||||
return $iId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user