浏览代码

#1173 Error during setup on a development system (XML containing unwanted text)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3821 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 年之前
父节点
当前提交
80639bc933
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      setup/compiler.class.inc.php

+ 2 - 5
setup/compiler.class.inc.php

@@ -1444,17 +1444,14 @@ EOF;
 		if ($oRelations)
 		{
 			$aRelations = array();
-			foreach($oRelations->childNodes as $oRelation)
+			foreach($oRelations->getElementsByTagName('relation') as $oRelation)
 			{
-				if ($oRelation->tagName != 'relation') continue;
-
 				$sRelationId = $oRelation->getAttribute('id');
 				$this->aRelations[$sRelationId] = array('id' => $sRelationId);
 
 				$oNeighbours = $oRelation->GetUniqueElement('neighbours');
-				foreach($oNeighbours->childNodes as $oNeighbour)
+				foreach($oNeighbours->getElementsByTagName('neighbour') as $oNeighbour)
 				{
-					if ($oNeighbour->tagName != 'neighbour') continue;
 					$sNeighbourId = $oNeighbour->getAttribute('id');
 
 					$sDirection = $oNeighbour->GetChildText('direction', 'both');