Use and update the description

This commit is contained in:
markjcrane
2023-07-04 15:24:13 -06:00
parent 6f73009728
commit 56d5c8a755
2 changed files with 8 additions and 7 deletions

View File

@@ -1756,8 +1756,8 @@ $text['description-destination_caller_id_name']['zh-cn'] = "输入来电显示
$text['description-destination_caller_id_name']['ja-jp'] = "発信者ID名を入力します。";
$text['description-destination_caller_id_name']['ko-kr'] = "발신자 ID 이름을 입력합니다.";
$text['description-destination_conditions']['en-us'] = "Add additional conditions.";
$text['description-destination_conditions']['en-gb'] = "Add additional conditions.";
$text['description-destination_conditions']['en-us'] = "If the condition matches perform the action.";
$text['description-destination_conditions']['en-gb'] = "If the condition matches perform the action.";
$text['description-destination_conditions']['ar-eg'] = "إضافة شروط إضافية.";
$text['description-destination_conditions']['de-at'] = "Zusätzliche Bedingungen hinzufügen.";
$text['description-destination_conditions']['de-ch'] = "Zusätzliche Bedingungen hinzufügen.";

View File

@@ -459,7 +459,7 @@
//set the last destination_app and destination_data variables
foreach($destination_actions as $destination_action) {
$action_array = explode(":", $destination_action, 2);
if (isset($action_array[0]) && $action_array[0] != '') {
if (isset($action_array[0]) && !empty($action_array[0])) {
$destination_app = $action_array[0];
$destination_data = $action_array[1];
}
@@ -532,7 +532,7 @@
//add the actions to the dialplan_xml
foreach($destination_actions as $destination_action) {
$action_array = explode(":", $destination_action, 2);
if (isset($action_array[0]) && $action_array[0] != '') {
if (isset($action_array[0]) && !empty($action_array[0])) {
if ($destination->valid($action_array[0].':'.$action_array[1])) {
$dialplan["dialplan_xml"] .= " <action application=\"".xml::sanitize($action_array[0])."\" data=\"".$action_array[1]."\"/>\n";
}
@@ -826,7 +826,7 @@
$action_array = explode(":", $field, 2);
$action_app = $action_array[0] ?? null;
$action_data = $action_array[1] ?? null;
if (isset($action_array[0]) && $action_array[0] != '') {
if (isset($action_array[0]) && !empty($action_array[0])) {
if ($destination->valid($action_app.':'.$action_data)) {
//add to the dialplan_details array
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
@@ -924,7 +924,7 @@
$action_array = explode(":", $destination_action, 2);
$action_app = $action_array[0] ?? null;
$action_data = $action_array[1] ?? null;
if (isset($action_array[0]) && $action_array[0] != '') {
if (isset($action_array[0]) && !empty($action_array[0])) {
if ($destination->valid($action_app.':'.$action_data)) {
$actions[$y]['destination_app'] = $action_app;
$actions[$y]['destination_data'] = $action_data;
@@ -1200,6 +1200,7 @@
}
//increment the row id
$x++;
}
//set the defaults
if (empty($destination_order)) { $destination_order = '100'; }
@@ -1518,7 +1519,7 @@
echo " <option value=\"caller_id_number\">".$text['option-caller_id_number']."</option>\n";
}
echo " </select>\n";
echo " <input class='formfld' type='text' name=\"destination_conditions[$x][condition_expression]\" id='destination_conditions' maxlength='255' value=\"".escape($row['condition_expression'])."\">\n";
echo " <input class='formfld' type='text' name=\"destination_conditions[$x][condition_expression]\" id='destination_conditions' maxlength='255' value=\"".escape($row['condition_expression'] ?? '')."\">\n";
echo " <br />\n";
echo $destination->select('dialplan', "destination_conditions[$x][condition_action]", $row['condition_app'].':'.$row['condition_data'])."<br />\n";
if (!empty($row['condition_app'])) {