remove instances where a pointer is used in a foreach loop for value (#7108)
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user