From 1ba1d850d8b2ec34961928e25cecf68dfa7b745b Mon Sep 17 00:00:00 2001 From: Garrett K Date: Fri, 26 Feb 2021 05:18:33 +0000 Subject: [PATCH] 0.3.14 --- includes/content-path2.php | 114 ++++++++++++++++++++----------------- 1 file changed, 62 insertions(+), 52 deletions(-) diff --git a/includes/content-path2.php b/includes/content-path2.php index 2e9ce76..71c4081 100755 --- a/includes/content-path2.php +++ b/includes/content-path2.php @@ -1,6 +1,6 @@ $port) { - - // Identify parent object ID - $portObjID = $port['objID']; - $portObj = $qls->App->objectArray[$portObjID]; + foreach($dataSet as $portIndex => $port) { + + // Identify parent object ID + $portObjID = $port['objID']; + $portObj = $qls->App->objectArray[$portObjID]; + $portObjParentID = $portObj['parent_id']; + while($portObjParentID != 0) { + $portObj = $qls->App->objectArray[$portObjParentID]; $portObjParentID = $portObj['parent_id']; - while($portObjParentID != 0) { - $portObj = $qls->App->objectArray[$portObjParentID]; - $portObjParentID = $portObj['parent_id']; - } - - // Determine path divergence - if($portIndex == 0) { - $baselineParentID = $portObjParentID; - } else { - if($portObjParentID != $baselineParentID) { - - // Flag this path as divergent - $pathDiverges = true; - - // Remove divergent connection - unset($data[$portIndex]); - } + } + + // Determine path divergence + if($portIndex == 0) { + $baselineParentID = $portObjParentID; + } else { + if($portObjParentID != $baselineParentID) { + + // Flag this path as divergent + $pathDiverges = true; + + // Remove divergent connection + unset($dataSet[$portIndex]); } } } - unset($data); return $pathDiverges; }