Update calls_active_inc.php

This commit is contained in:
FusionPBX
2018-01-21 23:53:36 -07:00
committed by GitHub
parent a11fb1a4ef
commit b4a817083e

View File

@@ -65,21 +65,20 @@
$rows = array();
if (isset($results["rows"])) {
foreach ($results["rows"] as &$row) {
$context = $row['context'];
//get the domain
if (substr_count($row['presence_id'], '@') > 0) {
$presence_id_array = explode('@', $row['presence_id']);
$row['domain_name'] = $presence_id_array[1];
}
else if (strlen($context) > 0) {
if (substr_count($context, '@') > 0) {
$context_array = explode('@', $context);
if (strlen($row['context']) > 0 and $row['context'] != "public") {
if (substr_count($row['context'], '@') > 0) {
$context_array = explode('@', $row['context']);
$row['domain_name'] = $context_array[1];
}
else {
$row['domain_name'] = $context;
$row['domain_name'] = $row['context'];
}
}
else if (substr_count($row['presence_id'], '@') > 0) {
$presence_id_array = explode('@', $row['presence_id']);
$row['domain_name'] = $presence_id_array[1].' '.__line__.' '.$row['presence_id'];
}
//add the row to the array
if (($show == 'all' && permission_exists('call_active_all'))) {
$rows[] = $row;
@@ -90,9 +89,10 @@
}
}
}
unset($results, $context);
unset($results);
}
//set the alternating color for each row
$c = 0;
$row_style["0"] = "row_style0";