mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
Compiler and co: fixed issue on delta load (delete then merge a node)
SVN:trunk[1964]
This commit is contained in:
@@ -1652,7 +1652,19 @@ class MFElement extends DOMElement
|
||||
public function MergeInto($oContainer, $sSearchId, $bMustExist)
|
||||
{
|
||||
$oTargetNode = $oContainer->FindExistingChildNode($this, $sSearchId);
|
||||
if (!$oTargetNode)
|
||||
if ($oTargetNode)
|
||||
{
|
||||
if ($oTargetNode->getAttribute('_alteration') == 'removed')
|
||||
{
|
||||
if ($bMustExist)
|
||||
{
|
||||
throw new Exception("XML datamodel loader: found mandatory node $this->tagName/$sSearchId marked as deleted in $oContainer->tagName");
|
||||
}
|
||||
$oTargetNode = $oContainer->ownerDocument->ImportNode($this, false);
|
||||
$oContainer->AddChildNode($oTargetNode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($bMustExist)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user