Slight efficiency improvement for active calls
This commit is contained in:
@@ -64,8 +64,7 @@ else {
|
|||||||
//send the event socket command
|
//send the event socket command
|
||||||
$json = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
$json = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||||
//set the array
|
//set the array
|
||||||
$result_array = json_decode($json, "true");
|
$results = json_decode($json, "true");
|
||||||
$result_array = $result_array["rows"];
|
|
||||||
|
|
||||||
//set the alternating color for each row
|
//set the alternating color for each row
|
||||||
$c = 0;
|
$c = 0;
|
||||||
@@ -102,7 +101,7 @@ else {
|
|||||||
echo "<th>".$text['label-opt']."</th>\n";
|
echo "<th>".$text['label-opt']."</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
foreach ($result_array as $row) {
|
foreach ($results["rows"] as $row) {
|
||||||
//set the php variables
|
//set the php variables
|
||||||
foreach ($row as $key => $value) {
|
foreach ($row as $key => $value) {
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
|
|||||||
Reference in New Issue
Block a user