From b26a4d85a2f74de75e00d5a414ddb17b6ae787c9 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 26 Nov 2016 21:44:20 -0700 Subject: [PATCH] Update call_center_active_inc.php --- .../call_center_active_inc.php | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/app/call_center_active/call_center_active_inc.php b/app/call_center_active/call_center_active_inc.php index d1bc6f0bd0..99867dc302 100644 --- a/app/call_center_active/call_center_active_inc.php +++ b/app/call_center_active/call_center_active_inc.php @@ -24,16 +24,20 @@ Mark J Crane James Rose */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('call_center_active_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('call_center_active_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -106,13 +110,15 @@ else { //prepare the result for array_multisort $x = 0; - if (isset($result)) foreach ($result as $row) { - $tier_result[$x]['level'] = $row['level']; - $tier_result[$x]['position'] = $row['position']; - $tier_result[$x]['agent'] = $row['agent']; - $tier_result[$x]['state'] = trim($row['state']); - $tier_result[$x]['queue'] = $row['queue']; - $x++; + if (is_array($result)) { + foreach ($result as $row) { + $tier_result[$x]['level'] = $row['level']; + $tier_result[$x]['position'] = $row['position']; + $tier_result[$x]['agent'] = $row['agent']; + $tier_result[$x]['state'] = trim($row['state']); + $tier_result[$x]['queue'] = $row['queue']; + $x++; + } } //sort the array //SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING @@ -356,4 +362,4 @@ else { echo "
\n"; } -?> \ No newline at end of file +?>