N°6408 - Add logs, changed modification test of current object and prevent calling OnDBUpdate() when object is not modified

This commit is contained in:
Eric Espie
2023-06-23 17:02:31 +02:00
parent 68ee12bf5e
commit c3469e43bc
24 changed files with 123 additions and 29 deletions

View File

@@ -469,7 +469,10 @@ abstract class CMDBObject extends DBObject
*/
public function DBDelete(&$oDeletionPlan = null)
{
return $this->DBDeleteTracked_Internal($oDeletionPlan);
$this->LogCRUDEnter(__METHOD__);
$oDeletionPlan = $this->DBDeleteTracked_Internal($oDeletionPlan);
$this->LogCRUDExit(__METHOD__);
return $oDeletionPlan;
}
/**
@@ -519,14 +522,6 @@ abstract class CMDBObject extends DBObject
utils::PopArchiveMode();
}
}
public function DBUpdate()
{
if (count($this->ListChanges()) === 0) {
return $this->GetKey();
}
return parent::DBUpdate(); // TODO: Change the autogenerated stub
}
}