mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02: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
|
try
|
||||||
{
|
{
|
||||||
$oDestObj = MetaModel::GetObject($this->Get('dest_class'), $this->Get('dest_id'));
|
$oDestObj = MetaModel::GetObject($this->Get('dest_class'), $this->Get('dest_id'));
|
||||||
$oDestObj->DBDeleteTracked($oChange);
|
$oCheckDeletionPlan = new DeletionPlan();
|
||||||
$this->DBDeleteTracked($oChange);
|
if ($oDestObj->CheckToDelete($oCheckDeletionPlan))
|
||||||
$oStatLog->Inc('stats_nb_obj_deleted');
|
{
|
||||||
|
$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)
|
catch(Exception $e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user