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

#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');