remove instances where a pointer is used in a foreach loop for value (#7108)
This commit is contained in:
@@ -77,7 +77,7 @@ if (!class_exists('basic_operator_panel')) {
|
||||
|
||||
//store extension status by user uuid
|
||||
if (isset($extensions)) {
|
||||
foreach($extensions as &$row) {
|
||||
foreach ($extensions as $row) {
|
||||
if ($row['user_uuid'] != '') {
|
||||
$ext_user_status[$row['user_uuid']] = $row['user_status'];
|
||||
unset($row['user_status']);
|
||||
@@ -97,7 +97,7 @@ if (!class_exists('basic_operator_panel')) {
|
||||
//build the response
|
||||
$x = 0;
|
||||
if (isset($extensions)) {
|
||||
foreach($extensions as &$row) {
|
||||
foreach ($extensions as $row) {
|
||||
$user = $row['extension'];
|
||||
if (!empty($row['number_alias'])) {
|
||||
$user = $row['number_alias'];
|
||||
@@ -143,7 +143,7 @@ if (!class_exists('basic_operator_panel')) {
|
||||
//add the active call details
|
||||
$found = false;
|
||||
if (isset($json_array['rows'])) {
|
||||
foreach($json_array['rows'] as &$field) {
|
||||
foreach ($json_array['rows'] as $field) {
|
||||
$presence_id = $field['presence_id'];
|
||||
$presence = explode("@", $presence_id);
|
||||
$presence_id = $presence[0];
|
||||
|
||||
@@ -491,7 +491,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||
if (permission_exists('call_block_extension')) {
|
||||
if (!empty($extensions)) {
|
||||
echo " <optgroup label='".$text['label-extension']."'>\n";
|
||||
foreach ($extensions as &$row) {
|
||||
foreach ($extensions as $row) {
|
||||
$selected = ($call_block_app == 'extension' && $call_block_data == $row['extension']) ? "selected='selected'" : null;
|
||||
echo " <option value='extension:".urlencode($row["extension"])."' ".$selected.">".escape($row['extension'])." ".escape($row['description'])."</option>\n";
|
||||
}
|
||||
@@ -501,7 +501,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||
if (permission_exists('call_block_ivr')) {
|
||||
if (!empty($ivrs)) {
|
||||
echo " <optgroup label='".$text['label-ivr_menus']."'>\n";
|
||||
foreach ($ivrs as &$row) {
|
||||
foreach ($ivrs as $row) {
|
||||
$selected = ($call_block_app == 'ivr' && $call_block_data == $row['ivr_menu_extension']) ? "selected='selected'" : null;
|
||||
echo " <option value='ivr:".urlencode($row["ivr_menu_extension"])."' ".$selected.">".escape($row['ivr_menu_name'])." ".escape($row['ivr_menu_extension'])."</option>\n";
|
||||
}
|
||||
@@ -511,7 +511,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||
if (permission_exists('call_block_ring_group')) {
|
||||
if (!empty($ring_groups)) {
|
||||
echo " <optgroup label='".$text['label-ring_groups']."'>\n";
|
||||
foreach ($ring_groups as &$row) {
|
||||
foreach ($ring_groups as $row) {
|
||||
$selected = ($call_block_app == 'ring_group' && $call_block_data == $row['ring_group_extension']) ? "selected='selected'" : null;
|
||||
echo " <option value='ring_group:".urlencode($row["ring_group_extension"])."' ".$selected.">".escape($row['ring_group_name'])." ".escape($row['ring_group_extension'])."</option>\n";
|
||||
}
|
||||
@@ -521,7 +521,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
|
||||
if (permission_exists('call_block_voicemail')) {
|
||||
if (!empty($voicemails)) {
|
||||
echo " <optgroup label='".$text['label-voicemail']."'>\n";
|
||||
foreach ($voicemails as &$row) {
|
||||
foreach ($voicemails as $row) {
|
||||
$selected = ($call_block_app == 'voicemail' && $call_block_data == $row['voicemail_id']) ? "selected='selected'" : null;
|
||||
echo " <option value='voicemail:".urlencode($row["voicemail_id"])."' ".$selected.">".escape($row['voicemail_id'])." ".escape($row['voicemail_description'])."</option>\n";
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ if ($domains_processed == 1) {
|
||||
$sql .= "and (t.call_center_queue_uuid is null or t.call_center_agent_uuid is null) ";
|
||||
$tiers = $database->select($sql, null, 'all');
|
||||
if (!empty($tiers)) {
|
||||
foreach ($tiers as $index => &$row) {
|
||||
foreach ($tiers as $index => $row) {
|
||||
if ($row['call_center_queue_uuid'] == null && $row['queue_uuid'] != null) {
|
||||
$array['call_center_tiers'][$index]['call_center_queue_uuid'] = $row['queue_uuid'];
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
unset($sql, $parameters);
|
||||
|
||||
if (!empty($tiers)) {
|
||||
foreach ($tiers as &$row) {
|
||||
foreach ($tiers as $row) {
|
||||
$call_center_agent_uuid = $row["call_center_agent_uuid"];
|
||||
$call_center_queue_uuid = $row["call_center_queue_uuid"];
|
||||
$queue_extension = $row["queue_extension"];
|
||||
@@ -543,7 +543,7 @@
|
||||
unset($sql, $parameters);
|
||||
|
||||
if (!empty($call_center_queues)) {
|
||||
foreach ($call_center_queues as &$row) {
|
||||
foreach ($call_center_queues as $row) {
|
||||
$queue_name = $row["queue_name"];
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$database_queue_name = $row["queue_name"];
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
|
||||
unset($destinations);
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$destinations[$x]['uuid'] = $row["follow_me_destination_uuid"];
|
||||
$destinations[$x]['destination'] = $row["follow_me_destination"];
|
||||
$destinations[$x]['delay'] = $row["follow_me_delay"];
|
||||
@@ -510,7 +510,7 @@
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo "\$(function() {\n";
|
||||
echo " var extensions = [\n";
|
||||
foreach ($extensions as &$row) {
|
||||
foreach ($extensions as $row) {
|
||||
if (empty($number_alias)) {
|
||||
echo " \"".escape($row["extension"])."\",\n";
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
//build a new array with domain_name
|
||||
$rows = array();
|
||||
if (isset($results["rows"])) {
|
||||
foreach ($results["rows"] as &$row) {
|
||||
foreach ($results["rows"] as $row) {
|
||||
//get the domain
|
||||
if (!empty($row['context']) && $row['context'] != "public" && $row['context'] != "default") {
|
||||
if (substr_count($row['context'], '@') > 0) {
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
if (is_array($rows)) {
|
||||
$x = 0;
|
||||
foreach ($rows as &$row) {
|
||||
foreach ($rows as $row) {
|
||||
|
||||
//set the php variables
|
||||
foreach ($row as $key => $value) {
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
$parameters['src'] = $src;
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$dest_cid_name = $row["outbound_caller_id_name"];
|
||||
$dest_cid_number = $row["outbound_caller_id_number"];
|
||||
break; //limit to 1 row
|
||||
|
||||
@@ -230,7 +230,7 @@ if (!class_exists('conference_centers')) {
|
||||
$database = new database;
|
||||
$conference_sessions = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($conference_sessions)) {
|
||||
foreach ($conference_sessions as &$row) {
|
||||
foreach ($conference_sessions as $row) {
|
||||
$recording = $row['recording'];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ if (!empty($_GET)) {
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($result)) {
|
||||
$e = 1;
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$vcard->data['email'.$e] = $row["email_address"];
|
||||
if ($e++ == 2) { break; } //limit to 2 rows
|
||||
}
|
||||
@@ -125,7 +125,7 @@ if (!empty($_GET)) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$phone_label = $row["phone_label"];
|
||||
$phone_number = $row["phone_number"];
|
||||
if ($phone_label == $text['option-work']) { $vcard_phone_type = 'work'; }
|
||||
@@ -154,7 +154,7 @@ if (!empty($_GET)) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$address_type = $row["address_type"];
|
||||
$address_street = $row["address_street"];
|
||||
$address_extended = $row["address_extended"];
|
||||
|
||||
@@ -1768,7 +1768,7 @@
|
||||
echo " <select name='fax_uuid' id='fax_uuid' class='formfld' style='".$select_style."'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if (!empty($result)) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
if ($row["fax_uuid"] == $fax_uuid) {
|
||||
echo " <option value='".escape($row["fax_uuid"])."' selected='selected'>".escape($row["fax_extension"])." ".escape($row["fax_name"])."</option>\n";
|
||||
}
|
||||
@@ -1796,7 +1796,7 @@
|
||||
echo " <select name='provider_uuid' id='provider_uuid' class='formfld' style='".$select_style."'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if (!empty($providers)) {
|
||||
foreach ($providers as &$row) {
|
||||
foreach ($providers as $row) {
|
||||
if ($row["provider_uuid"] == $provider_uuid) {
|
||||
echo " <option value='".escape($row["provider_uuid"])."' selected='selected'>".escape($row["provider_name"])."</option>\n";
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ if (!class_exists('destinations')) {
|
||||
//get the array from the app_config.php files
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
foreach ($config_list as $config_path) {
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
@@ -204,8 +204,8 @@ if (!class_exists('destinations')) {
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($apps as $x => &$app) {
|
||||
if (isset($app['destinations'])) foreach ($app['destinations'] as &$row) {
|
||||
foreach ($apps as $x => $app) {
|
||||
if (isset($app['destinations'])) foreach ($app['destinations'] as $row) {
|
||||
if (permission_exists($this->singular($row["name"])."_destinations")) {
|
||||
$this->destinations[] = $row;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ if (!class_exists('destinations')) {
|
||||
//get the array from the app_config.php files
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
foreach ($config_list as $config_path) {
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
@@ -579,9 +579,9 @@ if (!class_exists('destinations')) {
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($apps as $x => &$app) {
|
||||
foreach ($apps as $x => $app) {
|
||||
if (isset($app['destinations'])) {
|
||||
foreach ($app['destinations'] as &$row) {
|
||||
foreach ($app['destinations'] as $row) {
|
||||
$this->destinations[] = $row;
|
||||
}
|
||||
}
|
||||
@@ -779,7 +779,7 @@ if (!class_exists('destinations')) {
|
||||
//get the array from the app_config.php files
|
||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||
$x = 0;
|
||||
foreach ($config_list as &$config_path) {
|
||||
foreach ($config_list as $config_path) {
|
||||
try {
|
||||
include($config_path);
|
||||
}
|
||||
@@ -789,9 +789,9 @@ if (!class_exists('destinations')) {
|
||||
$x++;
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($apps as $x => &$app) {
|
||||
foreach ($apps as $x => $app) {
|
||||
if (isset($app['destinations'])) {
|
||||
foreach ($app['destinations'] as &$row) {
|
||||
foreach ($app['destinations'] as $row) {
|
||||
$this->destinations[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ if ($domains_processed == 1) {
|
||||
$sql .= "and k.device_key_vendor is null ";
|
||||
$device_keys = $database->select($sql, null, 'all');
|
||||
if (!empty($device_keys)) {
|
||||
foreach ($device_keys as $index => &$row) {
|
||||
foreach ($device_keys as $index => $row) {
|
||||
$array['device_keys'][$index]['device_key_uuid'] = $row["device_key_uuid"];
|
||||
$array['device_keys'][$index]['device_key_vendor'] = $row["device_vendor"];
|
||||
}
|
||||
@@ -87,7 +87,7 @@ if ($domains_processed == 1) {
|
||||
|
||||
//loop through the device_keys to build the data array
|
||||
if (!empty($device_profile_keys)) {
|
||||
foreach ($device_profile_keys as $index => &$row) {
|
||||
foreach ($device_profile_keys as $index => $row) {
|
||||
$array['device_profile_keys'][$index]['device_profile_key_uuid'] = $row["device_key_uuid"];
|
||||
$array['device_profile_keys'][$index]['domain_uuid'] = $row["domain_uuid"];
|
||||
$array['device_profile_keys'][$index]['device_profile_uuid'] = $row["device_profile_uuid"];
|
||||
@@ -131,7 +131,7 @@ if ($domains_processed == 1) {
|
||||
|
||||
//loop through the device_keys to build the data array
|
||||
if (!empty($device_profile_keys)) {
|
||||
foreach ($device_profile_keys as $index => &$row) {
|
||||
foreach ($device_profile_keys as $index => $row) {
|
||||
$array['device_profile_settings'][$index]['device_profile_setting_uuid'] = $row["device_setting_uuid"];
|
||||
$array['device_profile_settings'][$index]['domain_uuid'] = $row["domain_uuid"];
|
||||
$array['device_profile_settings'][$index]['device_profile_uuid'] = $row["device_profile_uuid"];
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
//find and remove the "|2" that denotes a duplicate header
|
||||
foreach ($headers as &$header) {
|
||||
foreach ($headers as $header) {
|
||||
$pos = strpos($header, '|');
|
||||
if ($pos !== false) {
|
||||
$header = substr($header, 0, $pos);
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
//remove empty device keys
|
||||
if (isset($row['device_keys'])) {
|
||||
$y = 0;
|
||||
foreach ($row['device_keys'] as &$sub_row) {
|
||||
foreach ($row['device_keys'] as $sub_row) {
|
||||
if (count($sub_row) == 2) {
|
||||
unset($array['devices'][$x]['device_keys']);
|
||||
}
|
||||
@@ -377,7 +377,7 @@
|
||||
//remove empty device lines
|
||||
if (isset($row['device_lines'])) {
|
||||
$y = 0;
|
||||
foreach ($row['device_lines'] as &$sub_row) {
|
||||
foreach ($row['device_lines'] as $sub_row) {
|
||||
if (count($sub_row) == 2) {
|
||||
unset($array['devices'][$x]['device_lines']);
|
||||
}
|
||||
@@ -413,7 +413,7 @@
|
||||
//remove empty device keys
|
||||
if (isset($row['device_keys'])) {
|
||||
$y = 0;
|
||||
foreach ($row['device_keys'] as &$sub_row) {
|
||||
foreach ($row['device_keys'] as $sub_row) {
|
||||
if (count($sub_row) == 2) {
|
||||
unset($array['devices'][$x]['device_keys']);
|
||||
}
|
||||
@@ -424,7 +424,7 @@
|
||||
//remove empty device lines
|
||||
if (isset($row['device_lines'])) {
|
||||
$y = 0;
|
||||
foreach ($row['device_lines'] as &$sub_row) {
|
||||
foreach ($row['device_lines'] as $sub_row) {
|
||||
if (count($sub_row) == 2) {
|
||||
unset($array['devices'][$x]['device_lines']);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
$parameters['device_profile_uuid'] = $device_profile_uuid;
|
||||
$database = new database;
|
||||
$result = $database->execute($sql, $parameters, 'all');
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
$device_profile_name = $row["device_profile_name"];
|
||||
$device_profile_keys = $row["device_profile_keys"] ?? null;
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
$vendor_function_groups = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
unset($group_list);
|
||||
foreach ($vendor_function_groups as &$sub_row) {
|
||||
foreach ($vendor_function_groups as $sub_row) {
|
||||
$group_list[] = escape($sub_row["group_name"]).(($sub_row['group_domain_uuid'] != '') ? "@".escape($_SESSION['domains'][$sub_row['group_domain_uuid']]['domain_name']) : null);
|
||||
}
|
||||
$group_list = isset($group_list) ? implode(', ', $group_list) : '';
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
//add or update the device keys
|
||||
if (is_array($_POST['device_keys'])) {
|
||||
foreach ($_POST['device_keys'] as &$row) {
|
||||
foreach ($_POST['device_keys'] as $row) {
|
||||
|
||||
//validate the data
|
||||
$save = true;
|
||||
@@ -187,7 +187,7 @@
|
||||
//process the profile keys
|
||||
if (!empty($row["device_profile_uuid"])) {
|
||||
//get the profile key settings from the array
|
||||
foreach ($device_profile_keys as &$field) {
|
||||
foreach ($device_profile_keys as $field) {
|
||||
if ($device_key_uuid == $field["device_key_uuid"]) {
|
||||
$database = $field;
|
||||
break;
|
||||
|
||||
@@ -684,7 +684,7 @@
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
echo " <select name='destination_uuid' id='destination_uuid' class='formfld' >\n";
|
||||
echo " <option></option>\n";
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
if (empty($row["dialplan_uuid"])) {
|
||||
echo " <option value='".escape($row["destination_uuid"])."' style=\"font-weight:bold;\">".escape($row["destination_number"])." ".escape($row["destination_description"])."</option>\n";
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
$group = 0;
|
||||
$order = 5;
|
||||
if (isset($dialplan['condition'])) {
|
||||
foreach ($dialplan['condition'] as &$row) {
|
||||
foreach ($dialplan['condition'] as $row) {
|
||||
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid;
|
||||
@@ -369,7 +369,7 @@
|
||||
}
|
||||
$order = $order + 5;
|
||||
if (isset($row['action'])) {
|
||||
foreach ($row['action'] as &$row2) {
|
||||
foreach ($row['action'] as $row2) {
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action';
|
||||
@@ -396,7 +396,7 @@
|
||||
}
|
||||
}
|
||||
if (isset($row['anti-action'])) {
|
||||
foreach ($row['anti-action'] as &$row2) {
|
||||
foreach ($row['anti-action'] as $row2) {
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'anti-action';
|
||||
@@ -515,7 +515,7 @@
|
||||
unset($sql, $parameters);
|
||||
$x = 0; $y = 0;
|
||||
if (!empty($dialplans)) {
|
||||
foreach ($dialplans as &$row) {
|
||||
foreach ($dialplans as $row) {
|
||||
//if the previous dialplan uuid has not been set then set it
|
||||
if (!isset($previous_dialplan_uuid)) { $previous_dialplan_uuid = $row['dialplan_uuid']; }
|
||||
|
||||
@@ -1027,7 +1027,7 @@
|
||||
|
||||
//get the array of xml files and then process thm
|
||||
$xml_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/resources/switch/conf/dialplan/*.xml");
|
||||
foreach ($xml_list as &$xml_file) {
|
||||
foreach ($xml_list as $xml_file) {
|
||||
//get and parse the xml
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
//get the order number prefix from the file name
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
$group = 0;
|
||||
$order = 5;
|
||||
if (isset($dialplan['condition'])) {
|
||||
foreach ($dialplan['condition'] as &$row) {
|
||||
foreach ($dialplan['condition'] as $row) {
|
||||
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid;
|
||||
@@ -374,7 +374,7 @@
|
||||
}
|
||||
$order = $order + 5;
|
||||
if (isset($row['action'])) {
|
||||
foreach ($row['action'] as &$row2) {
|
||||
foreach ($row['action'] as $row2) {
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action';
|
||||
@@ -401,7 +401,7 @@
|
||||
}
|
||||
}
|
||||
if (isset($row['anti-action'])) {
|
||||
foreach ($row['anti-action'] as &$row2) {
|
||||
foreach ($row['anti-action'] as $row2) {
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $domain_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid;
|
||||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'anti-action';
|
||||
@@ -518,7 +518,7 @@
|
||||
unset($sql, $parameters);
|
||||
$x = 0; $y = 0;
|
||||
if (!empty($dialplans)) {
|
||||
foreach ($dialplans as &$row) {
|
||||
foreach ($dialplans as $row) {
|
||||
//if the previous dialplan uuid has not been set then set it
|
||||
if (!isset($previous_dialplan_uuid)) { $previous_dialplan_uuid = $row['dialplan_uuid']; }
|
||||
|
||||
@@ -1087,7 +1087,7 @@
|
||||
|
||||
//get the array of xml files and then process thm
|
||||
$xml_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/resources/switch/conf/dialplan/*.xml");
|
||||
foreach ($xml_list as &$xml_file) {
|
||||
foreach ($xml_list as $xml_file) {
|
||||
//get and parse the xml
|
||||
$xml_string = file_get_contents($xml_file);
|
||||
//get the order number prefix from the file name
|
||||
|
||||
@@ -1474,7 +1474,7 @@
|
||||
if (!empty($destinations)) {
|
||||
echo " <select name='outbound_caller_id_name' id='outbound_caller_id_name' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($destinations as &$row) {
|
||||
foreach ($destinations as $row) {
|
||||
if(!empty($row["destination_caller_id_name"])){
|
||||
if (!empty($outbound_caller_id_name) && $row["destination_caller_id_name"] == $outbound_caller_id_name) {
|
||||
echo " <option value='".escape($row["destination_caller_id_name"])."' selected='selected'>".escape($row["destination_caller_id_name"])."</option>\n";
|
||||
@@ -1511,7 +1511,7 @@
|
||||
if (!empty($destinations)) {
|
||||
echo " <select name='outbound_caller_id_number' id='outbound_caller_id_number' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($destinations as &$row) {
|
||||
foreach ($destinations as $row) {
|
||||
$tmp = $row["destination_caller_id_number"];
|
||||
if(empty($tmp)){
|
||||
$tmp = $row["destination_number"];
|
||||
@@ -1552,7 +1552,7 @@
|
||||
if (!empty($emergency_destinations)) {
|
||||
echo " <select name='emergency_caller_id_name' id='emergency_caller_id_name' class='formfld'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($emergency_destinations as &$row) {
|
||||
foreach ($emergency_destinations as $row) {
|
||||
$tmp = $row["destination_caller_id_name"];
|
||||
if(empty($tmp)){
|
||||
$tmp = $row["destination_description"];
|
||||
@@ -1598,7 +1598,7 @@
|
||||
if (permission_exists('emergency_caller_id_select_empty')) {
|
||||
echo " <option value=''></option>\n";
|
||||
}
|
||||
foreach ($emergency_destinations as &$row) {
|
||||
foreach ($emergency_destinations as $row) {
|
||||
$tmp = $row["destination_caller_id_number"];
|
||||
if(empty($tmp)){
|
||||
$tmp = $row["destination_number"];
|
||||
|
||||
@@ -216,7 +216,7 @@ if (!class_exists('extension')) {
|
||||
$call_group = $row['call_group'] ?? '';
|
||||
$call_group = str_replace(";", ",", $call_group);
|
||||
$tmp_array = explode(",", $call_group);
|
||||
foreach ($tmp_array as &$tmp_call_group) {
|
||||
foreach ($tmp_array as $tmp_call_group) {
|
||||
$tmp_call_group = trim($tmp_call_group);
|
||||
if (!empty($tmp_call_group)) {
|
||||
if (empty($call_group_array[$tmp_call_group])) {
|
||||
@@ -508,7 +508,7 @@ if (!class_exists('extension')) {
|
||||
$xml .= " to keep searching for the user in the directory.\n";
|
||||
$xml .= " -->\n";
|
||||
$extension_array = explode(",", $extension_list);
|
||||
foreach ($extension_array as &$tmp_extension) {
|
||||
foreach ($extension_array as $tmp_extension) {
|
||||
$xml .= " <user id=\"$tmp_extension\" type=\"pointer\"/>\n";
|
||||
}
|
||||
$xml .= " </users>\n";
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
if (count($destinations) > 0) {
|
||||
echo "<select class='formfld' name='extensions[".$x."][outbound_caller_id]' id='outbound_caller_id_number_".$x."' style='width: 100%; min-width: 150px;'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($destinations as &$field) {
|
||||
foreach ($destinations as $field) {
|
||||
if (!empty($field['destination_caller_id_number'])) {
|
||||
echo "<option value='".escape($field['destination_caller_id_name'])."@".escape($field['destination_caller_id_number'])."' ".($row['outbound_caller_id_number'] == $field['destination_caller_id_number'] ? "selected='selected'" : null).">".escape($field['destination_caller_id_name'])." ".escape($field['destination_caller_id_number'])."</option>\n";
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ unset($sql);
|
||||
function arr_to_map(&$arr){
|
||||
if (!empty($arr)){
|
||||
$map = Array();
|
||||
foreach($arr as &$val){
|
||||
foreach ($arr as $val){
|
||||
$map[$val] = true;
|
||||
}
|
||||
return $map;
|
||||
@@ -187,17 +187,17 @@ if (!empty($result) && @sizeof($result) != 0) {
|
||||
|
||||
//Debug print
|
||||
print('attachments:' . "\n");
|
||||
foreach($message['attachments'] as &$attachment){
|
||||
foreach ($message['attachments'] as $attachment){
|
||||
print(' - ' . $attachment['type'] . ' - ' . $attachment['name'] . ': ' . $attachment['size'] . ' disposition: ' . $attachment['disposition'] . "\n");
|
||||
}
|
||||
print('messages:' . "\n");
|
||||
foreach($message['messages'] as &$msg){
|
||||
foreach ($message['messages'] as $msg){
|
||||
print(' - ' . $msg['type'] . ' - ' . $msg['size'] . "\n");
|
||||
// print($msg['data']);
|
||||
// print("\n--------------------------------------------------------\n");
|
||||
}
|
||||
|
||||
foreach($message['messages'] as &$msg){
|
||||
foreach ($message['messages'] as $msg){
|
||||
if(($msg['size'] > 0)) {
|
||||
$fax_message = $msg['data'];
|
||||
break;
|
||||
@@ -217,7 +217,7 @@ if (!empty($result) && @sizeof($result) != 0) {
|
||||
$emailed_files = Array();
|
||||
$attachments = $message['attachments'];
|
||||
if (sizeof($attachments) > 0) {
|
||||
foreach ($attachments as &$attachment) {
|
||||
foreach ($attachments as $attachment) {
|
||||
$fax_file_extension = pathinfo($attachment['name'], PATHINFO_EXTENSION);
|
||||
|
||||
//block unknown files
|
||||
|
||||
@@ -893,7 +893,7 @@ if (!$included) {
|
||||
|
||||
//build the contact labels
|
||||
if (is_array($contacts) && @sizeof($contacts) != 0) {
|
||||
foreach ($contacts as &$row) {
|
||||
foreach ($contacts as $row) {
|
||||
if ($row['contact_organization'] != '') {
|
||||
$contact_option_label = $row['contact_organization'];
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ function parse_message($connection, $message_number, $option = null, $to_charset
|
||||
$flatten = Array(1 => $structure);
|
||||
}
|
||||
|
||||
foreach($flatten as $id => &$part){
|
||||
foreach ($flatten as $id => $part){
|
||||
switch($part->type) {
|
||||
case TYPETEXT:
|
||||
$message = parse_message_decode_text($connection, $part, $message_number, $id, $option, $to_charset);
|
||||
@@ -39,7 +39,7 @@ function parse_message_decode_text($connection, &$part, $message_number, $id, $o
|
||||
if($msg && $to_charset){
|
||||
$charset = '';
|
||||
if(isset($part->parameters) && count($part->parameters)) {
|
||||
foreach($part->parameters as &$parameter){
|
||||
foreach ($part->parameters as $parameter){
|
||||
if($parameter->attribute == 'CHARSET') {
|
||||
$charset = $parameter->value;
|
||||
break;
|
||||
@@ -123,7 +123,7 @@ function parse_message_get_type(&$part){
|
||||
}
|
||||
|
||||
function parse_message_flatten(&$structure, &$result = array(), $prefix = '', $index = 1, $fullPrefix = true) {
|
||||
foreach($structure as &$part) {
|
||||
foreach ($structure as $part) {
|
||||
if(isset($part->parts)) {
|
||||
if($part->type == TYPEMESSAGE) {
|
||||
parse_message_flatten($part->parts, $result, $prefix.$index.'.', 0, false);
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
//get the the ivr menu options
|
||||
$y = 0;
|
||||
foreach ($ivr_menu_options as &$row) {
|
||||
foreach ($ivr_menu_options as $row) {
|
||||
//update the uuids
|
||||
$row['ivr_menu_uuid'] = $ivr_menu_uuid;
|
||||
$row['ivr_menu_option_uuid'] = uuid();
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
$ivr->ivr_menu_uuid = $ivr_menu_uuid;
|
||||
$ivr_menus = $ivr->find();
|
||||
if (!empty($ivr_menus)) {
|
||||
foreach ($ivr_menus as &$row) {
|
||||
foreach ($ivr_menus as $row) {
|
||||
$dialplan_uuid = $row["dialplan_uuid"];
|
||||
$ivr_menu_name = $row["ivr_menu_name"];
|
||||
$ivr_menu_extension = $row["ivr_menu_extension"];
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
$database = new database;
|
||||
$sub_result = $database->select($sub_sql, $parameters, 'all');
|
||||
if (is_array($sub_result) && @sizeof($sub_result) != 0) {
|
||||
foreach ($sub_result as &$sub_row) {
|
||||
foreach ($sub_result as $sub_row) {
|
||||
//$ivr_menu_uuid = $sub_row["ivr_menu_uuid"];
|
||||
$ivr_menu_option_digits = $sub_row["ivr_menu_option_digits"];
|
||||
$ivr_menu_option_action = $sub_row["ivr_menu_option_action"];
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
$sql .= "where module_order is null ";
|
||||
$modules = $database->select($sql, null, 'all');
|
||||
if (is_array($modules) && @sizeof($modules) != 0) {
|
||||
foreach ($modules as $index => &$row) {
|
||||
foreach ($modules as $index => $row) {
|
||||
//get the module details
|
||||
$mod = $module->info($row['module_name']);
|
||||
//update the module order
|
||||
|
||||
@@ -674,7 +674,7 @@ if (!class_exists('modules')) {
|
||||
//set the default
|
||||
$result = false;
|
||||
//look for the module
|
||||
foreach ($this->modules as &$row) {
|
||||
foreach ($this->modules as $row) {
|
||||
if ($row['module_name'] == $name) {
|
||||
$result = true;
|
||||
break;
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
$recordings = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($recordings) && @sizeof($recordings) != 0) {
|
||||
echo "<optgroup label='Recordings'>\n";
|
||||
foreach ($recordings as &$row) {
|
||||
foreach ($recordings as $row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($music_on_hold_chime_list == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && !empty($music_on_hold_chime_list)) {
|
||||
@@ -396,7 +396,7 @@
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
echo "<optgroup label='Phrases'>\n";
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
if ($music_on_hold_chime_list == "phrase:".$row["phrase_uuid"]) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='phrase:".escape($row["phrase_uuid"])."' selected='selected'>".escape($row["phrase_name"])."</option>\n";
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
$number_translation = new number_translations;
|
||||
|
||||
//process the xml files
|
||||
foreach ($xml_list as &$xml_file) {
|
||||
foreach ($xml_list as $xml_file) {
|
||||
//get and parse the xml
|
||||
$number_translation->xml = file_get_contents($xml_file);
|
||||
$number_translation->import();
|
||||
|
||||
@@ -108,7 +108,7 @@ if (!class_exists('number_translations')) {
|
||||
//loop through the condition array
|
||||
$order = 5;
|
||||
if (isset($number_translation['rule'])) {
|
||||
foreach ($number_translation['rule'] as &$row) {
|
||||
foreach ($number_translation['rule'] as $row) {
|
||||
if (array_key_exists('@attributes', $row)) {
|
||||
$row = $row['@attributes'];
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ if ($domains_processed == 1) {
|
||||
$sql .= "from v_phrase_details where phrase_detail_function = 'play-file' ";
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $index => &$row) {
|
||||
foreach ($result as $index => $row) {
|
||||
$phrase_detail_uuid = $row['phrase_detail_uuid'];
|
||||
$phrase_detail_data = $row['phrase_detail_data'];
|
||||
if (substr_count($phrase_detail_data, $setting->get('switch','recordings').'/'.$domain_name) > 0) {
|
||||
@@ -105,7 +105,7 @@ if ($domains_processed == 1) {
|
||||
$sql .= "and phrase_detail_data like 'lua(streamfile.lua %)' ";
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $index => &$row) {
|
||||
foreach ($result as $index => $row) {
|
||||
$phrase_detail_uuid = $row['phrase_detail_uuid'];
|
||||
$phrase_detail_data = $row['phrase_detail_data'];
|
||||
//update function and data to use standard method
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
if (is_array($recordings) && @sizeof($recordings) != 0) {
|
||||
echo "var opt_group = document.createElement('optgroup');\n";
|
||||
echo "opt_group.label = \"".$text['label-recordings']."\";\n";
|
||||
foreach ($recordings as &$row) {
|
||||
foreach ($recordings as $row) {
|
||||
if (!empty($_SESSION['recordings']['storage_type']['text']) && $_SESSION['recordings']['storage_type']['text'] == 'base64') {
|
||||
echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"\${lua streamfile.lua ".$row["recording_filename"]."}\"));\n";
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
$database_contacts = $this->database->select($sql, $parameters, 'all');
|
||||
if (is_array($database_contacts)) {
|
||||
$x = 0;
|
||||
foreach ($database_contacts as &$row) {
|
||||
foreach ($database_contacts as $row) {
|
||||
$uuid = $row['contact_uuid'];
|
||||
$phone_label = strtolower($row['phone_label'] ?? '');
|
||||
$contact_category = strtolower($row['contact_category'] ?? '');
|
||||
@@ -1269,7 +1269,7 @@
|
||||
|
||||
//process each device
|
||||
if (is_array($result)) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
//get the values from the database and set as variables
|
||||
$domain_uuid = $row["domain_uuid"];
|
||||
$device_uuid = $row["device_uuid"];
|
||||
@@ -1311,7 +1311,7 @@
|
||||
|
||||
//loop through the provision templates
|
||||
if (is_array($dir_array)) {
|
||||
foreach ($dir_array as &$template_path) {
|
||||
foreach ($dir_array as $template_path) {
|
||||
if (is_dir($template_path)) continue;
|
||||
if (!file_exists($template_path)) continue;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
$sql .= "or recording_base64 = '' ";
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
//set the variables
|
||||
$recording_uuid = $row['recording_uuid'];
|
||||
$recording_domain_uuid = $row['domain_uuid'];
|
||||
@@ -84,7 +84,7 @@
|
||||
$sql .= "where recording_base64 is not null ";
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
//set the variables
|
||||
$recording_uuid = $row['recording_uuid'];
|
||||
$recording_domain_uuid = $row['domain_uuid'];
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$array_recordings[$row['recording_uuid']] = $row['recording_filename'];
|
||||
$array_base64_exists[$row['recording_uuid']] = ($row['recording_base64'] != '') ? true : false;
|
||||
//if not base64, convert back to local files and remove base64 from db
|
||||
|
||||
@@ -73,7 +73,7 @@ if (!class_exists('switch_recordings')) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach ($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
$recordings[$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name']."/".$row['recording_filename']] = $row['recording_filename'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
$sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/switch/resources/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
$xml_files = glob($sip_profile_dir);
|
||||
foreach ($xml_files as $x => &$xml_file) {
|
||||
foreach ($xml_files as $x => $xml_file) {
|
||||
//load the sip profile xml and save it into an array
|
||||
$sip_profile_xml = file_get_contents($xml_file);
|
||||
$xml = simplexml_load_string($sip_profile_xml);
|
||||
@@ -165,7 +165,7 @@
|
||||
$sip_profile_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/switch/resources/conf/sip_profiles/*.xml.noload';
|
||||
}
|
||||
$xml_files = glob($sip_profile_dir);
|
||||
foreach ($xml_files as $x => &$xml_file) {
|
||||
foreach ($xml_files as $x => $xml_file) {
|
||||
//load the sip profile xml and save it into an array
|
||||
$sip_profile_xml = file_get_contents($xml_file);
|
||||
$xml = simplexml_load_string($sip_profile_xml);
|
||||
|
||||
@@ -92,7 +92,7 @@ if (is_uuid($sip_profile_uuid) && $sip_profile_name != '') {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$array['sip_profile_domains'][$x]['sip_profile_domain_uuid'] = uuid();
|
||||
$array['sip_profile_domains'][$x]['sip_profile_uuid'] = $sip_profile_uuid_new;
|
||||
$array['sip_profile_domains'][$x]['sip_profile_domain_name'] = $row["sip_profile_domain_name"];
|
||||
@@ -109,7 +109,7 @@ if (is_uuid($sip_profile_uuid) && $sip_profile_name != '') {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$array['sip_profile_settings'][$x]['sip_profile_setting_uuid'] = uuid();
|
||||
$array['sip_profile_settings'][$x]['sip_profile_uuid'] = $sip_profile_uuid_new;
|
||||
$array['sip_profile_settings'][$x]['sip_profile_setting_name'] = $row["sip_profile_setting_name"];
|
||||
|
||||
@@ -41,7 +41,7 @@ if ($domains_processed == 1) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
||||
$greeting_id = preg_replace('{\D}', '', $row['greeting_filename']);
|
||||
//build update array
|
||||
@@ -75,7 +75,7 @@ if ($domains_processed == 1) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (!empty($result)) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
||||
$greeting_domain_uuid = $row['domain_uuid'];
|
||||
$voicemail_id = $row['voicemail_id'];
|
||||
@@ -117,7 +117,7 @@ if ($domains_processed == 1) {
|
||||
$database = new database;
|
||||
$result = $database->select($sql, null, 'all');
|
||||
if (is_array($result) && @sizeof($result) != 0) {
|
||||
foreach ($result as $x => &$row) {
|
||||
foreach ($result as $x => $row) {
|
||||
//set variables
|
||||
$voicemail_greeting_uuid = $row['voicemail_greeting_uuid'];
|
||||
$greeting_domain_uuid = $row['domain_uuid'];
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
//add the voicemail messages to the array
|
||||
if (is_array($voicemails)) {
|
||||
foreach ($voicemails as &$row) {
|
||||
foreach ($voicemails as $row) {
|
||||
//get the voicemail messages
|
||||
$row['messages'] = $this->voicemail_messages($row['voicemail_id']);
|
||||
}
|
||||
@@ -310,7 +310,7 @@
|
||||
|
||||
//update the array with additional information
|
||||
if (is_array($result)) {
|
||||
foreach($result as &$row) {
|
||||
foreach ($result as $row) {
|
||||
//set the greeting directory
|
||||
$path = $this->settings->get('switch', 'voicemail', '/var/lib/freeswitch/storage').'/default/'.$_SESSION['domain_name'].'/'.$row['voicemail_id'];
|
||||
if (file_exists($path.'/msg_'.$row['voicemail_message_uuid'].'.wav')) {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
$messages[$field['voicemail_uuid']]['ext'] = $field['voicemail_id'];
|
||||
$messages[$field['voicemail_uuid']]['total'] = 0;
|
||||
$messages[$field['voicemail_uuid']]['new'] = 0;
|
||||
foreach($field['messages'] as &$row) {
|
||||
foreach ($field['messages'] as $row) {
|
||||
if ($row['message_status'] == '') {
|
||||
$messages[$field['voicemail_uuid']]['new']++;
|
||||
$messages['new']++;
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
$voicemails_count_tmp = $database->select($sql, $parameters, 'all');
|
||||
|
||||
$voicemails_count = array();
|
||||
foreach ($voicemails_count_tmp as &$row) {
|
||||
foreach ($voicemails_count_tmp as $row) {
|
||||
$voicemails_count[$row['voicemail_uuid']] = $row['voicemail_count'];
|
||||
}
|
||||
unset($sql, $parameters, $voicemails_count_tmp);
|
||||
@@ -188,7 +188,7 @@
|
||||
$voicemail_greetings_count_tmp = $database->select($sql, $parameters, 'all');
|
||||
|
||||
$voicemail_greetings_count = array();
|
||||
foreach ($voicemail_greetings_count_tmp as &$row) {
|
||||
foreach ($voicemail_greetings_count_tmp as $row) {
|
||||
$voicemail_greetings_count[$row['voicemail_id']] = $row['greeting_count'];
|
||||
}
|
||||
unset($sql, $parameters, $voicemail_greetings_count_tmp);
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
echo " <select class='formfld' name='extension_uuid' id='extension_uuid'>\n";
|
||||
echo " <option value=''></option>";
|
||||
if (is_array($extensions) && @sizeof($extensions) != 0) {
|
||||
foreach ($extensions as &$row) {
|
||||
foreach ($extensions as $row) {
|
||||
$selected = ($row['extension_uuid'] == $extension_uuid) ? "selected" : null;
|
||||
echo " <option value='".escape($row['extension_uuid'])."' ".escape($selected).">".((is_numeric($row['extension'])) ? escape($row['extension']) : escape($row['number_alias'])." (".escape($row['extension']).")")."</option>";
|
||||
}
|
||||
@@ -592,7 +592,7 @@
|
||||
echo " <select class='formfld' name='call_center_queue_uuid' id='call_center_queue_uuid'>\n";
|
||||
echo " <option value=''></option>";
|
||||
if (is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
||||
foreach ($call_center_queues as &$row) {
|
||||
foreach ($call_center_queues as $row) {
|
||||
$selected = ($row['call_center_queue_uuid'] == $call_center_queue_uuid) ? "selected" : null;
|
||||
echo " <option value='".escape($row['call_center_queue_uuid'])."' ".escape($selected).">".((is_numeric($row['queue_extension'])) ? escape($row['queue_extension']." (".$row['queue_name'].")") : escape($row['queue_extension'])." (".escape($row['queue_extension']).")")."</option>";
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
echo " <select class='formfld' name='extension_uuid' id='extension_uuid'>\n";
|
||||
echo " <option value=''></option>";
|
||||
if (is_array($extensions) && @sizeof($extensions) != 0) {
|
||||
foreach ($extensions as &$row) {
|
||||
foreach ($extensions as $row) {
|
||||
$selected = (!empty($caller_extension_uuid) && $row['extension_uuid'] == $caller_extension_uuid) ? "selected" : null;
|
||||
echo " <option value='".escape($row['extension_uuid'])."' ".escape($selected).">".((is_numeric($row['extension'])) ? escape($row['extension']) : escape($row['number_alias'])." (".escape($row['extension']).")")."</option>";
|
||||
}
|
||||
@@ -325,7 +325,7 @@
|
||||
echo " <select class='formfld' name='call_center_queue_uuid' id='call_center_queue_uuid'>\n";
|
||||
echo " <option value=''></option>";
|
||||
if (is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
||||
foreach ($call_center_queues as &$row) {
|
||||
foreach ($call_center_queues as $row) {
|
||||
$selected = ($row['call_center_queue_uuid'] == $call_center_queue_uuid) ? "selected" : null;
|
||||
echo " <option value='".escape($row['call_center_queue_uuid'])."' ".escape($selected).">".((is_numeric($row['queue_extension'])) ? escape($row['queue_extension']." (".$row['queue_name'].")") : escape($row['queue_extension'])." (".escape($row['queue_extension']).")")."</option>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user