Selaa lähdekoodia

XML Modelization of the relations: updated the conversion from 1.2 to 1.1

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3553 a333f486-631f-4898-b8df-5754b55c2be0
romainq 10 vuotta sitten
vanhempi
commit
bd03d15b7b
1 muutettua tiedostoa jossa 11 lisäystä ja 2 poistoa
  1. 11 2
      setup/itopdesignformat.class.inc.php

+ 11 - 2
setup/itopdesignformat.class.inc.php

@@ -431,14 +431,23 @@ class iTopDesignFormat
 		{
 			$oNode->setAttribute('xsi:type', 'AttributeInteger');
 			// The property class_attcode is left there (doing no harm)
-			$this->LogWarning('The attribute '.self::GetItopNodePath($oNode), ' has been degraded into an integer attribute. Any OQL query using this attribute will fail.');
+			$this->LogWarning('The attribute '.self::GetItopNodePath($oNode).' has been degraded into an integer attribute. Any OQL query using this attribute will fail.');
+		}
+
+		// Remove Redundancy settings attributes (no redundancy could be defined in the previous format)
+		//
+		$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field[@xsi:type='AttributeRedundancySettings']");
+		foreach ($oNodeList as $oNode)
+		{
+			$this->LogWarning('The attribute '.self::GetItopNodePath($oNode).' is of no use and must be removed.');
+			$this->DeleteNode($oNode);
 		}
 
 		// Later: transform the relations into code (iif defined as an SQL query)
 		$oNodeList = $oXPath->query('/itop_design/classes//class/relations');
 		foreach ($oNodeList as $oNode)
 		{
-			$this->LogWarning('The relations defined in '.self::GetItopNodePath($oNode). ' will be lost.');
+			$this->LogWarning('The relations defined in '.self::GetItopNodePath($oNode).' will be lost.');
 			$this->DeleteNode($oNode);
 		}