mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 23:18:43 +02:00
N°6408 - Add logs, changed modification test of current object and prevent calling OnDBUpdate() when object is not modified
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user