From 59c3f565a381d459f50be453d7ed0db0673ebcf6 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Sat, 1 Apr 2017 20:05:14 +0000 Subject: [PATCH] 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. SVN:trunk[4649] --- core/relationgraph.class.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/relationgraph.class.inc.php b/core/relationgraph.class.inc.php index 68f2cdd73..e7af4ff9f 100644 --- a/core/relationgraph.class.inc.php +++ b/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))