From 58b571f08add6ef978b0c4d232f749e63dfb3fbe Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Thu, 12 May 2016 19:13:06 +0000 Subject: [PATCH] Model factory: handle the flag 'if_exists' when transforming XML from version 1.3 to older versions SVN:trunk[4076] --- setup/itopdesignformat.class.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup/itopdesignformat.class.inc.php b/setup/itopdesignformat.class.inc.php index a86c5b367..922b3a2a7 100644 --- a/setup/itopdesignformat.class.inc.php +++ b/setup/itopdesignformat.class.inc.php @@ -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'); + } } /**