Give precedence to number_alias over extension in destinations class that generates the destination select list.
This commit is contained in:
parent
47921ff596
commit
74804cea64
|
|
@ -25,10 +25,11 @@
|
|||
$apps[$x]['destinations'][$y]['type'] = "sql";
|
||||
$apps[$x]['destinations'][$y]['label'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['name'] = "extensions";
|
||||
$apps[$x]['destinations'][$y]['sql'] = "select extension, number_alias, user_context as context, description from v_extensions ";
|
||||
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and enabled = 'true' ";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "extension asc";
|
||||
$apps[$x]['destinations'][$y]['order_by'] = "number_alias, extension asc";
|
||||
$apps[$x]['destinations'][$y]['field']['context'] = "user_context";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "extension";
|
||||
$apps[$x]['destinations'][$y]['field']['destination'] = "number_alias,extension";
|
||||
$apps[$x]['destinations'][$y]['field']['description'] = "description";
|
||||
$apps[$x]['destinations'][$y]['select_value']['user_contact'] = "user/\${destination}@\${domain_name}";
|
||||
$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}";
|
||||
|
|
|
|||
|
|
@ -203,13 +203,31 @@ class destinations {
|
|||
}
|
||||
}
|
||||
else {
|
||||
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
|
||||
if (strlen($data['label']) == 0) {
|
||||
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
|
||||
if (strpos($value,',') !== false) {
|
||||
$keys = explode(",", $value);
|
||||
foreach ($keys as $k) {
|
||||
if (strlen($data[$k]) > 0) {
|
||||
$select_value = str_replace("\${".$key."}", $data[$k], $select_value);
|
||||
if (strlen($data['label']) == 0) {
|
||||
$select_label = str_replace("\${".$key."}", $data[$k], $select_label);
|
||||
}
|
||||
else {
|
||||
$label = $data['label'];
|
||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label]."215", $select_label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
$label = $data['label'];
|
||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
||||
$select_value = str_replace("\${".$key."}", $data[$key], $select_value);
|
||||
if (strlen($data['label']) == 0) {
|
||||
$select_label = str_replace("\${".$key."}", $data[$key], $select_label);
|
||||
}
|
||||
else {
|
||||
$label = $data['label'];
|
||||
$select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue