mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Use the labels array which will always exist.
This commit is contained in:
@@ -2047,7 +2047,7 @@ if (permission_exists('contact_url_view')) {
|
||||
foreach($contact_url_labels as $label) {
|
||||
$url_label_options[] = "<option value='".$label."' ".(($label == $row['url_label']) ? "selected='selected'" : null).">".$label."</option>";
|
||||
}
|
||||
$url_label_found = (in_array($url_label, $_SESSION["contact"]["url_label"])) ? true : false;
|
||||
$url_label_found = (in_array($url_label, $contact_url_labels)) ? true : false;
|
||||
|
||||
echo " <select class='formfld' ".((!$url_label_found && $url_label != '') ? "style='display: none;'" : "style='width: auto;'")." name='contact_urls[$x][url_label]' id='url_label' onchange=\"getElementById('url_label_custom').value='';\">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
@@ -2160,7 +2160,7 @@ if (permission_exists('contact_relation_view')) {
|
||||
foreach($relation_labels as $label) {
|
||||
$relation_label_options[] = "<option value='".escape($label)."' ".(($label == $row['relation_label']) ? "selected='selected'" : null).">".escape($label)."</option>";
|
||||
}
|
||||
$relation_label_found = (in_array($relation_label, $_SESSION["contact"]["relation_label"])) ? true : false;
|
||||
$relation_label_found = (in_array($relation_label, $relation_labels)) ? true : false;
|
||||
echo " <select class='formfld' ".((!$relation_label_found && $relation_label != '') ? "style='display: none;'" : "style='auto;'")." name='contact_relations[$x][relation_label]' id='relation_label' onchange=\"getElementById('relation_label_custom').value='';\">\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo (is_array($relation_label_options)) ? implode("\n", $relation_label_options) : null;
|
||||
|
||||
Reference in New Issue
Block a user