From a63258b283d116a0b573c65c232c7dce882d471d Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 16 Aug 2014 02:01:53 +0000 Subject: [PATCH] Slight efficiency improvement for active calls --- app/calls_active/calls_active_inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php index 4d9113b76b..1c7cdc76d5 100644 --- a/app/calls_active/calls_active_inc.php +++ b/app/calls_active/calls_active_inc.php @@ -64,8 +64,7 @@ else { //send the event socket command $json = trim(event_socket_request($fp, 'api '.$switch_cmd)); //set the array - $result_array = json_decode($json, "true"); - $result_array = $result_array["rows"]; + $results = json_decode($json, "true"); //set the alternating color for each row $c = 0; @@ -102,7 +101,7 @@ else { echo "".$text['label-opt']."\n"; echo "\n"; - foreach ($result_array as $row) { + foreach ($results["rows"] as $row) { //set the php variables foreach ($row as $key => $value) { $$key = $value;