Преглед изворни кода

Ignore silently unknown attributes when loading a XML file since we know have variations in the data model of the CMDB...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2358 a333f486-631f-4898-b8df-5754b55c2be0
dflaven пре 12 година
родитељ
комит
6ff323c986
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      setup/xmldataloader.class.inc.php

+ 3 - 2
setup/xmldataloader.class.inc.php

@@ -212,8 +212,9 @@ class XMLDataLoader
 				if (!MetaModel::IsValidAttCode($sClass, $sAttCode))
 				{
 					$sMsg = "Unknown attribute code - $sClass/$sAttCode";
-					SetupPage::log_error($sMsg);
-					throw(new Exception($sMsg));
+					continue; // ignore silently...
+					//SetupPage::log_error($sMsg);
+					//throw(new Exception($sMsg));
 				}
 
 				$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);