diff --git a/backend/process_admin_edit-user.php b/backend/process_admin_edit-user.php index bca4fb7..cd95237 100755 --- a/backend/process_admin_edit-user.php +++ b/backend/process_admin_edit-user.php @@ -47,9 +47,7 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ if($userType == 'active') { $query = $qls->SQL->select('*', 'users', array('id' => array('=', $userID))); if($qls->SQL->num_rows($query)) { - error_log('Debug: here'); $qls->Admin->remove_user($userID); - error_log($qls->Admin->remove_user_error); } else { $errMsg = 'User ID does not exist.'; array_push($validate->returnData['error'], $errMsg); diff --git a/backend/process_cabinet-objects.php b/backend/process_cabinet-objects.php index 643a563..7de569b 100755 --- a/backend/process_cabinet-objects.php +++ b/backend/process_cabinet-objects.php @@ -327,25 +327,20 @@ function checkInsertCompatibility($parent_id, $parent_face, $parent_depth, $obje if($parent['encTolerance'] == 'Strict') { if($parent['hUnits'] != $insert['templateHUnits']) { - error_log('Debug: hUnits'); $compatible = false; } if($parent['vUnits'] != $insert['templateVUnits']) { - error_log('Debug: vUnits'); $compatible = false; } if($parent['encLayoutX'] != $insert['templateEncLayoutX']) { - error_log('Debug: layoutX'); $compatible = false; } if($parent['encLayoutY'] != $insert['templateEncLayoutY']) { - error_log('Debug: layoutY'); $compatible = false; } } if($parent['partitionFunction'] != $insert['templateFunction']) { - error_log('Debug: function'); $compatible = false; } diff --git a/backend/process_cable.php b/backend/process_cable.php index 0492f21..8b45244 100755 --- a/backend/process_cable.php +++ b/backend/process_cable.php @@ -214,15 +214,12 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ foreach($objIDArray as $objID) { $templateID = $qls->App->objectArray[$objID]['template_id']; $templateType = $qls->App->templateArray[$templateID]['templateType']; - //error_log('Debug(templateType): '.$templateType); if(isset($qls->App->floorplanObjDetails[$templateType])) { $templateFunction = $qls->App->templateArray[$templateID]['templateFunction']; - //error_log('Debug(templateFunction): '.$templateFunction); if($templateFunction == 'Endpoint') { if(isset($qls->App->peerArrayWalljack[$objID])) { foreach($qls->App->peerArrayWalljack[$objID] as $peerEntry) { $rowID = $peerEntry['rowID']; - //error_log('Debug(rowID): '.$rowID); $qls->SQL->delete('app_object_peer', array('id' => array('=', $rowID))); } } diff --git a/backend/process_image-upload.php b/backend/process_image-upload.php index b585dc3..83c46dd 100755 --- a/backend/process_image-upload.php +++ b/backend/process_image-upload.php @@ -79,7 +79,6 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ $validate->returnData['success']['imgWidth'] = $templateImgWidth; } else if($action == 'floorplanImage') { $floorplanID = $postData['floorplanID']; - error_log('floorplanID'.$floorplanID); // Update database with new filname $set = array( diff --git a/backend/process_integration-data-upload.php b/backend/process_integration-data-upload.php index c6f630e..71fb0d7 100755 --- a/backend/process_integration-data-upload.php +++ b/backend/process_integration-data-upload.php @@ -1866,12 +1866,6 @@ function validateImportedTrunks($qls, &$importedTrunkArray, $portArray, $importe $walljackPortIDArray = array(); - $debugObjectArray = fopen($_SERVER['DOCUMENT_ROOT'].'/debug-objectArray.json', 'w'); - fwrite($debugObjectArray, json_encode($importedObjectArray)); - - $debugTrunkArray = fopen($_SERVER['DOCUMENT_ROOT'].'/debug-trunkArray.json', 'w'); - fwrite($debugTrunkArray, json_encode($importedTrunkArray)); - foreach($importedTrunkArray as &$trunk) { $csvLine = $trunk['line']; @@ -1881,11 +1875,8 @@ function validateImportedTrunks($qls, &$importedTrunkArray, $portArray, $importe array('peerColumn' => 'PeerA', 'nameHash' => $trunk['nameHash'], 'portNameHash' => $trunk['portNameHash']), array('peerColumn' => 'PeerB', 'nameHash' => $trunk['peerNameHash'], 'portNameHash' => $trunk['peerPortNameHash']) ); - $portName = $trunk['portName']; - $portNameHash = $trunk['portNameHash']; - $peerPortName = $trunk['peerPortName']; - $peerPortNameHash = $trunk['peerPortNameHash']; + // Collect trunk peer data foreach($peerDataArray as &$peerData) { $peerDataFound = false; @@ -1894,6 +1885,7 @@ function validateImportedTrunks($qls, &$importedTrunkArray, $portArray, $importe $portNameHash = $peerData['portNameHash']; if(isset($portArray[$portNameHash])) { + // Standard object ports are found in portArray $peerDataFound = true; @@ -1913,11 +1905,13 @@ function validateImportedTrunks($qls, &$importedTrunkArray, $portArray, $importe // $obj = $qls->App->objectArray[$objID]; $objTemplateID = $obj['template_id']; + $peerData['id'] = $objID; $peerData['templateID'] = $objTemplateID; $peerData['face'] = $face; $peerData['depth'] = $depth; } else if(isset($importedObjectArray[$nameHash])) { + // Walljack objects are found in importedObjectArray $importedObj = $importedObjectArray[$nameHash]; $objID = $importedObj['id']; @@ -1948,6 +1942,7 @@ function validateImportedTrunks($qls, &$importedTrunkArray, $portArray, $importe $trunk['aPortID'] = $portID; // + $peerData['id'] = $objID; $peerData['templateID'] = $objTemplateID; $peerData['face'] = 0; $peerData['depth'] = 0; @@ -1963,104 +1958,14 @@ function validateImportedTrunks($qls, &$importedTrunkArray, $portArray, $importe } unset($peerData); - - /* - // Store PeerA data - if(isset($portArray[$portNameHash])) { - - // Collect trunk object information - $port = $portArray[$portNameHash]; - $objID = $port['objID']; - $face = $port['face']; - $depth = $port['depth']; - $portID = $port['portID']; - $obj = $qls->App->objectArray[$objID]; - $objTemplateID = $obj['template_id']; - $objTemplate = $qls->App->templateArray[$objTemplateID]; - $objTemplateType = $objTemplate['templateType']; - - if($objTemplateType == 'walljack') { - - $peerTrunkEntry = $importedTrunkArray[$peerPortNameHash]; - $nameHash = $peerTrunkEntry['nameHash']; - - // Create variable to track walljack portID - if(!isset($walljackPortIDArray[$nameHash])) { - $walljackPortIDArray[$nameHash] = 0; - } - - // Store walljack portID - $portID = $walljackPortIDArray[$nameHash]; - - // Increment walljack portID - $walljackPortIDArray[$nameHash]++; - } - - // Store the A side Info - $trunk['aObjID'] = $objID; - $trunk['aFace'] = $face; - $trunk['aDepth'] = $depth; - $trunk['aPortID'] = $portID; - - } else { - error_log('Debug (portName-portNameHash): '.$portName.'-'.$portNameHash); - $errMsg = 'Port on line '.$csvLine.' of file "'.$csvFileName.'" does not exist.'; - array_push($validate->returnData['error'], $errMsg); - } - - // Store PeerB data - if(isset($portArray[$peerPortNameHash])) { - - // Collect trunk object information - $peerPort = $portArray[$peerPortNameHash]; - $peerID = $peerPort['objID']; - $peerFace = $peerPort['face']; - $peerDepth = $peerPort['depth']; - $peerPortID = $peerPort['portID']; - $peer = $qls->App->objectArray[$peerID]; - $peerTemplateID = $peer['template_id']; - $peerTemplate = $qls->App->templateArray[$peerTemplateID]; - $peerTemplateType = $peerTemplate['templateType']; - - if($peerTemplateType == 'walljack') { - - $peerTrunkEntry = $importedTrunkArray[$portNameHash]; - $nameHash = $peerTrunkEntry['nameHash']; - - // Create variable to track walljack portID - if(!isset($walljackPortIDArray[$nameHash])) { - $walljackPortIDArray[$nameHash] = 0; - } - - // Store walljack portID - $peerPortID = $walljackPortIDArray[$nameHash]; - - // Increment walljack portID - $walljackPortIDArray[$nameHash]++; - } - - // Store the A side Info - $trunk['bObjID'] = $peerID; - $trunk['bFace'] = $peerFace; - $trunk['bDepth'] = $peerDepth; - $trunk['bPortID'] = $peerPortID; - - } else { - error_log('Debug (peerPortName-peerPortNameHash): '.$peerPortName.'-'.$peerPortNameHash); - $errMsg = 'Port on line '.$csvLine.' of file "'.$csvFileName.'" does not exist.'; - array_push($validate->returnData['error'], $errMsg); - } - */ - - - - + // Validate trunk peer compatibility if($peerDataArray[0]['templateID'] and $peerDataArray[1]['templateID']) { $objTemplateID = $peerDataArray[0]['templateID']; $face = $peerDataArray[0]['face']; $depth = $peerDataArray[0]['depth']; + $peerID = $peerDataArray[1]['templateID']; $peerTemplateID = $peerDataArray[1]['templateID']; $peerFace = $peerDataArray[1]['face']; $peerDepth = $peerDataArray[1]['depth']; @@ -3051,15 +2956,10 @@ function buildPortArray(&$qls){ $partitionType = $compatibility['partitionType']; if($partitionType == 'Connectable') { if($templateType == 'walljack') { - error_log('here1'); if(isset($qls->App->peerArray[$objID][$faceID][$depth]['peerArray'])) { - error_log('here2'); foreach($qls->App->peerArray[$objID][$faceID][$depth]['peerArray'] as $peerID => $peer) { - error_log('here3'); foreach($peer as $peerFaceID => $peerFace) { - error_log('here4'); foreach($peerFace as $peerDepth => $partition) { - error_log('here5'); $peerObj = $qls->App->objectArray[$peerID]; $peerObjName = $peerObj['nameString']; $peerTemplateID = $peerObj['template_id']; @@ -3067,7 +2967,6 @@ function buildPortArray(&$qls){ $peerObjPortNameFormat = json_decode($peerCompatibility['portNameFormat'], true); $peerObjPortTotal = $peerCompatibility['portTotal']; foreach($partition as $portPair) { - error_log('here6'); $peerPortID = $portPair[1]; $portID = $portPair[0]; $peerObjPortName = $qls->App->generatePortName($peerObjPortNameFormat, $peerPortID, $peerObjPortTotal); diff --git a/backend/process_object-custom.php b/backend/process_object-custom.php index 625a74f..18efd21 100755 --- a/backend/process_object-custom.php +++ b/backend/process_object-custom.php @@ -456,7 +456,6 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ function updatePartitionData(&$partitionData, $depth, $value, $attribute, &$counter=0){ foreach($partitionData as &$element) { - error_log('Debug: '.$depth.'-'.$counter.'-'.$element['partitionType']); if($counter == $depth) { $element[$attribute] = $value; return; diff --git a/backend/process_path_finder.php b/backend/process_path_finder.php index b0aca58..44be396 100755 --- a/backend/process_path_finder.php +++ b/backend/process_path_finder.php @@ -694,8 +694,4 @@ function getSize($objID, &$qls){ } return $size; } - -// Debug templates -// file_put_contents('filename.output', json_encode($array)); -// error_log('Debug (debugName): '.json_encode($array)); ?> diff --git a/backend/process_template-import.php b/backend/process_template-import.php index 6ae5b86..183afc2 100755 --- a/backend/process_template-import.php +++ b/backend/process_template-import.php @@ -30,7 +30,6 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ // Submit the POST request $result = curl_exec($ch); - error_log('Debug: '.$result); // Collect POST response $importData = json_decode($result, true); diff --git a/backend/retrieve_floorplan_object_details.php b/backend/retrieve_floorplan_object_details.php index ed90bf8..ad40abe 100755 --- a/backend/retrieve_floorplan_object_details.php +++ b/backend/retrieve_floorplan_object_details.php @@ -31,9 +31,6 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ $type = $floorplanObjectTemplate['templateType']; $trunkable = $qls->App->floorplanObjDetails[$type]['trunkable']; - error_log('Debug (objectID): '.$objectID); - error_log('Debug (floorplanObjectTemplateID): '.$floorplanObjectTemplateID); - error_log('Debug (type): '.$type); $peerIDArray = array(); $objPortArray = array(); if($trunkable) { diff --git a/includes/Admin.class.php b/includes/Admin.class.php index bbb6d43..d956d57 100755 --- a/includes/Admin.class.php +++ b/includes/Admin.class.php @@ -222,7 +222,6 @@ var $permissions = array( $this->remove_user_error = ADMIN_REMOVE_USER_NO_AUTH; return false; } - error_log('Debug: '.$this->remove_user_error); } /** diff --git a/includes/MySQLie.class.php b/includes/MySQLie.class.php index 0bb83b9..dae357a 100755 --- a/includes/MySQLie.class.php +++ b/includes/MySQLie.class.php @@ -841,10 +841,9 @@ var $qls; if ($query != '') { $this->update_queries(); $this->last_query[] = $query; - //$start = microtime(true); + $result = mysqli_query($this->connection, $query) or die(mysqli_errno($this->connection) . ': ' . mysqli_error($this->connection)); - //$end = microtime(true); - //error_log('Debug (query time): '.($start - $end)); + return $result; } else { diff --git a/includes/Pub.class.php b/includes/Pub.class.php index fcc800f..5372ec1 100755 --- a/includes/Pub.class.php +++ b/includes/Pub.class.php @@ -78,7 +78,6 @@ var $qls; $returnData['success'] = false; $returnData['msg'] = 'Error when submitting email data to proxy server.'; } else { - error_log('Debug: response = '.$responseJSON); $response = json_decode($responseJSON, true); } } diff --git a/includes/Update.class.php b/includes/Update.class.php index 8b9c28e..4c3b324 100755 --- a/includes/Update.class.php +++ b/includes/Update.class.php @@ -1054,11 +1054,9 @@ var $qls; $howMuchToIncrement = floor($index / $numerator); - //error_log('Index:'.$index.' Order:'.$order.' howMuchToIncrement:'.$howMuchToIncrement.' numerator:'.$numerator); if($howMuchToIncrement >= $count) { $rollOver = floor($howMuchToIncrement / $count); $howMuchToIncrement = $howMuchToIncrement - ($rollOver * $count); - //error_log('rollOver:'.$howMuchToIncrement); } if($type == 'incremental') { diff --git a/includes/Validate.class.php b/includes/Validate.class.php index ae0c0eb..651d78f 100755 --- a/includes/Validate.class.php +++ b/includes/Validate.class.php @@ -389,7 +389,6 @@ class Validate { return false; } else { if (!preg_match($this->portNameFieldIncrementalRegEx, $input)){ - error_log('Failed Incremental Validation: '.$input); $errorMsg = $reference ? $reference : 'Incremental port name fields may only contain a single alphanumeric character.'; array_push($this->returnData['error'], $errorMsg); return false; diff --git a/includes/content-path.php b/includes/content-path.php index aed1acd..bfb4bf6 100755 --- a/includes/content-path.php +++ b/includes/content-path.php @@ -220,7 +220,6 @@ for($x=0; $x<2; $x++){ } function isFloorplanTrunked($peer, $portID) { - error_log('Debug: '.json_encode($peer)); $isTrunked = false; foreach($peer['peerArray'] as $peerObjID => $peerObj) { foreach($peerObj as $peerFaceID => $peerFace) { diff --git a/includes/header.php b/includes/header.php index 2279fab..ff4306b 100755 --- a/includes/header.php +++ b/includes/header.php @@ -39,12 +39,8 @@ header('Content-Type: text/html; charset=iso-8859-1'); // The language we are using require_once('Blank.lang.php'); -define('START_TIME', microtime(true)); - // The qls class will start the other classes require_once('qls.class.php'); $qls = new qls(SYS_CURRENT_LANG); -error_log('Debug (time taken header1): '.(microtime(true)-START_TIME)); - ?> diff --git a/includes/path_functions.php b/includes/path_functions.php index 4fec60f..b684590 100755 --- a/includes/path_functions.php +++ b/includes/path_functions.php @@ -940,7 +940,7 @@ function buildTrunkFlatPath($objectID, $objectFace, $objectDepth, &$qls){ $portTotal = $partitionCompatibility['portLayoutX']*$partitionCompatibility['portLayoutY']; $firstIndex = 0; $lastIndex = $portTotal - 1; - error_log('Debug: '.json_encode($portNameFormat)); + $firstPortName = $qls->App->generatePortName($portNameFormat, $firstIndex, $portTotal); $lastPortName = $qls->App->generatePortName($portNameFormat, $lastIndex, $portTotal); $portRange = $firstPortName.' ‑ '.$lastPortName;