From 692c850d59f6d9c3029d13dee64f4467d8d7f794 Mon Sep 17 00:00:00 2001 From: Garrett K Date: Fri, 26 Feb 2021 04:14:21 +0000 Subject: [PATCH] 0.3.14 --- includes/content-path2.php | 119 ++++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/includes/content-path2.php b/includes/content-path2.php index 5b25617..9919c6f 100755 --- a/includes/content-path2.php +++ b/includes/content-path2.php @@ -1,6 +1,7 @@ $conn) { + $trunkSet = array(); - // Loop over each port of $conn - foreach($conn as $connID => $port) { + // Loop over each port of $conn + foreach($portSet as $portSetID => $port) { + + // Gather port data + $objID = $port['objID']; + $objFace = $port['objFace']; + $objDepth = $port['objDepth']; + $objPort = $port['objPort']; + + // Gather trunk peer data + if(isset($qls->App->peerArray[$objID][$objFace][$objDepth])) { - // Gather port data - $objID = $port['objID']; - $objFace = $port['objFace']; - $objDepth = $port['objDepth']; - $objPort = $port['objPort']; + // Gather trunk peer object + $peer = $qls->App->peerArray[$objID][$objFace][$objDepth]; // Gather trunk peer data - if(isset($qls->App->peerArray[$objID][$objFace][$objDepth])) { - - // Gather trunk peer object - $peer = $qls->App->peerArray[$objID][$objFace][$objDepth]; - - // Gather trunk peer data - $peerObjID = $peer['peerID']; - $peerObjFace = $peer['peerFace']; - $peerObjDepth = $peer['peerDepth']; - $peerObjPort = $objPort; - - // Create a working array for cleanliness - $workingArray = array( - 'objID' => $peerObjID, - 'objFace' => $peerObjFace, - 'objDepth' => $peerObjDepth, - 'objPort' => $peerObjPort - ); - - // Store trunk data - $trunkSet[$connSetID][$connID] = $workingArray; - } + $peerObjID = $peer['peerID']; + $peerObjFace = $peer['peerFace']; + $peerObjDepth = $peer['peerDepth']; + $peerObjPort = $objPort; + + // Create a working array for cleanliness + $workingArray = array( + 'objID' => $peerObjID, + 'objFace' => $peerObjFace, + 'objDepth' => $peerObjDepth, + 'objPort' => $peerObjPort + ); + + // Store trunk data + $trunkSet[$portSetID] = $workingArray; } } return $trunkSet; } -function crawlConn(&$qls, $objID, $objFace, $objDepth, $objPort, $connSetID=0, &$connSet=array(array(),array())) { +function crawlConn(&$qls, $objID, $objFace, $objDepth, $objPort, &$connSet=array(array(),array()), $connSetID=0) { // Store port details $workingArray = array( @@ -131,7 +140,7 @@ function crawlConn(&$qls, $objID, $objFace, $objDepth, $objPort, $connSetID=0, & } if(!$alreadySeen) { - crawlConn($qls, $remoteObjID, $remoteObjFace, $remoteObjDepth, $remoteObjPort, $connSetID, $connSet); + crawlConn($qls, $remoteObjID, $remoteObjFace, $remoteObjDepth, $remoteObjPort, $connSet, $connSetID); } } }