Model factory: handle the flag 'if_exists' when transforming XML from version 1.3 to older versions

SVN:trunk[4076]
This commit is contained in:
Romain Quetiez
2016-05-12 19:13:06 +00:00
parent 14a2d9960f
commit 58b571f08a

View File

@@ -519,6 +519,15 @@ class iTopDesignFormat
$this->LogWarning('The attribute '.self::GetItopNodePath($oNode).' is irrelevant and must be removed.');
$this->DeleteNode($oNode);
}
// Discard _delta="if_exists"
//
$oNodeList = $oXPath->query("//*[@_delta='if_exists']");
foreach ($oNodeList as $oNode)
{
$this->LogWarning('The flag _delta="if_exists" on '.self::GetItopNodePath($oNode).' is irrelevant and must be replaced by _delta="must_exist".');
$oNode->setAttribute('_delta', 'must_exist');
}
}
/**