mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 06:58:49 +02:00
#242 loosing linked objects when modifying name attribute
SVN:trunk[748]
This commit is contained in:
@@ -790,10 +790,14 @@ abstract class DBObject
|
||||
{
|
||||
$aOriginalList = $oOriginalSet->ToArray();
|
||||
$aNewSet = $oLinks->ToArray();
|
||||
$aToDelete = array_diff($aOriginalList, $aNewSet);
|
||||
foreach ($aToDelete as $iKey => $oObject)
|
||||
|
||||
foreach($aOriginalList as $iId => $oObject)
|
||||
{
|
||||
$oObject->DBDelete();
|
||||
if (!array_key_exists($iId, $aNewSet))
|
||||
{
|
||||
// It disappeared from the list
|
||||
$oObject->DBDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user