mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Operator Panel: Adjustments to correctly display the user status of the extensions assigned to the current user.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
function get_call_activity() {
|
||||
global $db;
|
||||
global $ext_user_status;
|
||||
|
||||
//get the extensions and their user status
|
||||
$sql = "select ";
|
||||
@@ -10,6 +11,7 @@ function get_call_activity() {
|
||||
$sql .= "e.effective_caller_id_number, ";
|
||||
$sql .= "e.call_group, ";
|
||||
$sql .= "e.description, ";
|
||||
$sql .= "u.user_uuid, ";
|
||||
$sql .= "u.user_status ";
|
||||
$sql .= "from ";
|
||||
$sql .= "v_extensions as e ";
|
||||
@@ -24,6 +26,14 @@ function get_call_activity() {
|
||||
$extensions = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
//store extension status by user uuid
|
||||
foreach($extensions as &$row) {
|
||||
if ($row['user_uuid'] != '') {
|
||||
$ext_user_status[$row['user_uuid']] = $row['user_status'];
|
||||
unset($row['user_uuid'], $row['user_status']);
|
||||
}
|
||||
}
|
||||
|
||||
//send the command
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
|
||||
Reference in New Issue
Block a user