Fix. Display domain name for inbound calls in calls_active app (#2917)

This commit is contained in:
Alexey Melnichuk
2017-11-21 09:09:57 -07:00
committed by FusionPBX
parent c94b910d7b
commit cc364e9bb2
+3 -2
View File
@@ -65,6 +65,7 @@
$rows = array(); $rows = array();
if (isset($results["rows"])) { if (isset($results["rows"])) {
foreach ($results["rows"] as &$row) { foreach ($results["rows"] as &$row) {
$context = $row['context'];
//get the domain //get the domain
if (substr_count($row['presence_id'], '@') > 0) { if (substr_count($row['presence_id'], '@') > 0) {
$presence_id_array = explode('@', $row['presence_id']); $presence_id_array = explode('@', $row['presence_id']);
@@ -76,7 +77,7 @@
$row['domain_name'] = $context_array[1]; $row['domain_name'] = $context_array[1];
} }
else { else {
$row['domain_name'] = $row['context']; $row['domain_name'] = $context;
} }
} }
//add the row to the array //add the row to the array
@@ -89,7 +90,7 @@
} }
} }
} }
unset($results); unset($results, $context);
} }
//set the alternating color for each row //set the alternating color for each row