Browse Source

Fixes a regression introduced in [r4642]. N.450 Impact analysis. The previous fix aimed at generating more redundancy nodes, but in fact it generated too many in some circumstances.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4649 a333f486-631f-4898-b8df-5754b55c2be0
romainq 8 năm trước cách đây
mục cha
commit
3681a6a896
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      core/relationgraph.class.inc.php

+ 3 - 2
core/relationgraph.class.inc.php

@@ -108,7 +108,7 @@ class RelationRedundancyNode extends GraphNode
 	 */	
 	public static function MakeId($sRelCode, $sNeighbourId, $oSourceObject, $oSinkObject)
 	{
-		return 'redundancy-'.$sRelCode.'-'.get_class($oSourceObject).'-'.$sNeighbourId.'-'.get_class($oSinkObject).'::'.$oSinkObject->GetKey();
+		return 'redundancy-'.$sRelCode.'-'.$sNeighbourId.'-'.get_class($oSinkObject).'::'.$oSinkObject->GetKey();
 	}
 
 	/**
@@ -449,7 +449,8 @@ class RelationGraph extends SimpleGraph
 		$oObject = $oToNode->GetProperty('object');
 		if ($this->IsRedundancyEnabled($sRelCode, $aQueryInfo, $oToNode))
 		{
-			$sId = RelationRedundancyNode::MakeId($sRelCode, $aQueryInfo['sNeighbour'], $oFromNode->GetProperty('object'), $oToNode->GetProperty('object'));
+			$sUniqueNeighbourId = $aQueryInfo['sDefinedInClass'].'-'.$aQueryInfo['sNeighbour'];
+			$sId = RelationRedundancyNode::MakeId($sRelCode, $sUniqueNeighbourId, $oFromNode->GetProperty('object'), $oToNode->GetProperty('object'));
 
 			$oRedundancyNode = $this->GetNode($sId);
 			if (is_null($oRedundancyNode))