瀏覽代碼

ImageAttribute: only in XML version 1.3

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4131 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 年之前
父節點
當前提交
de3826039a

+ 1 - 1
datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2">
+<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3">
   <classes>
     <class id="Organization" _delta="define">
       <parent>cmdbAbstractObject</parent>

+ 9 - 0
setup/itopdesignformat.class.inc.php

@@ -520,6 +520,15 @@ class iTopDesignFormat
 			$this->DeleteNode($oNode);
 		}
 
+		// Remove Image attributes
+		//
+		$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field[@xsi:type='AttributeImage']");
+		foreach ($oNodeList as $oNode)
+		{
+			$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']");