mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Better (?) handling of deletion issues during the synchro...
SVN:trunk[1368]
This commit is contained in:
@@ -1761,9 +1761,19 @@ class SynchroReplica extends DBObject implements iDisplay
|
||||
try
|
||||
{
|
||||
$oDestObj = MetaModel::GetObject($this->Get('dest_class'), $this->Get('dest_id'));
|
||||
$oDestObj->DBDeleteTracked($oChange);
|
||||
$this->DBDeleteTracked($oChange);
|
||||
$oStatLog->Inc('stats_nb_obj_deleted');
|
||||
$oCheckDeletionPlan = new DeletionPlan();
|
||||
if ($oDestObj->CheckToDelete($oCheckDeletionPlan))
|
||||
{
|
||||
$oActualDeletionPlan = new DeletionPlan();
|
||||
$oDestObj->DBDeleteTracked($oChange, null, $oActualDeletionPlan);
|
||||
$this->DBDeleteTracked($oChange);
|
||||
$oStatLog->Inc('stats_nb_obj_deleted');
|
||||
}
|
||||
else
|
||||
{
|
||||
$sIssues = implode("\n", $oCheckDeletionPlan->GetIssues());
|
||||
throw(new Exception($sIssues));
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user