Update call_center_active_inc.php

This commit is contained in:
FusionPBX 2016-11-26 21:44:20 -07:00 committed by GitHub
parent bf60efb15c
commit 3f835ae957
1 changed files with 24 additions and 18 deletions

View File

@ -24,9 +24,13 @@
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com> James Rose <james.o.rose@gmail.com>
*/ */
//includes
include "root.php"; include "root.php";
require_once "resources/require.php"; require_once "resources/require.php";
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
//check permissions
if (permission_exists('call_center_active_view')) { if (permission_exists('call_center_active_view')) {
//access granted //access granted
} }
@ -106,7 +110,8 @@ else {
//prepare the result for array_multisort //prepare the result for array_multisort
$x = 0; $x = 0;
if (isset($result)) foreach ($result as $row) { if (is_array($result)) {
foreach ($result as $row) {
$tier_result[$x]['level'] = $row['level']; $tier_result[$x]['level'] = $row['level'];
$tier_result[$x]['position'] = $row['position']; $tier_result[$x]['position'] = $row['position'];
$tier_result[$x]['agent'] = $row['agent']; $tier_result[$x]['agent'] = $row['agent'];
@ -114,6 +119,7 @@ else {
$tier_result[$x]['queue'] = $row['queue']; $tier_result[$x]['queue'] = $row['queue'];
$x++; $x++;
} }
}
//sort the array //SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING //sort the array //SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING
if (isset($tier_result)) { array_multisort($tier_result, SORT_ASC); } if (isset($tier_result)) { array_multisort($tier_result, SORT_ASC); }