Fax: Remove deprecated fax_send_greeting elements.
This commit is contained in:
parent
99c9486ede
commit
8bd5bc04dd
|
|
@ -183,9 +183,6 @@
|
||||||
$apps[$x]['permissions'][$y]['name'] = "fax_active_all";
|
$apps[$x]['permissions'][$y]['name'] = "fax_active_all";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$y++;
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "fax_send_greeting";
|
|
||||||
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
|
||||||
$y++;
|
|
||||||
$apps[$x]['permissions'][$y]['name'] = "fax_destinations";
|
$apps[$x]['permissions'][$y]['name'] = "fax_destinations";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
|
@ -565,10 +562,6 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
$z++;
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_send_greeting";
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
|
||||||
$z++;
|
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_send_channels";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_send_channels";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
|
|
||||||
|
|
@ -2400,30 +2400,6 @@ $text['label-accountcode']['zh-cn'] = "账户法";
|
||||||
$text['label-accountcode']['ja-jp'] = "アカウントコード";
|
$text['label-accountcode']['ja-jp'] = "アカウントコード";
|
||||||
$text['label-accountcode']['ko-kr'] = "계정 코드";
|
$text['label-accountcode']['ko-kr'] = "계정 코드";
|
||||||
|
|
||||||
$text['label-fax_send_greeting']['en-us'] = "Greeting";
|
|
||||||
$text['label-fax_send_greeting']['en-gb'] = "Greeting";
|
|
||||||
$text['label-fax_send_greeting']['ar-eg'] = "التحية";
|
|
||||||
$text['label-fax_send_greeting']['de-at'] = "Begrüßung";
|
|
||||||
$text['label-fax_send_greeting']['de-ch'] = "Begrüßung";
|
|
||||||
$text['label-fax_send_greeting']['de-de'] = "Begrüßung";
|
|
||||||
$text['label-fax_send_greeting']['es-cl'] = "Saludos";
|
|
||||||
$text['label-fax_send_greeting']['es-mx'] = "Saludos";
|
|
||||||
$text['label-fax_send_greeting']['fr-ca'] = "Salutation";
|
|
||||||
$text['label-fax_send_greeting']['fr-fr'] = "Salutation";
|
|
||||||
$text['label-fax_send_greeting']['he-il'] = "תגית: Greeting";
|
|
||||||
$text['label-fax_send_greeting']['it-it'] = "Saluti";
|
|
||||||
$text['label-fax_send_greeting']['nl-nl'] = "Gegroet";
|
|
||||||
$text['label-fax_send_greeting']['pl-pl'] = "Powitanie";
|
|
||||||
$text['label-fax_send_greeting']['pt-br'] = "Saudação";
|
|
||||||
$text['label-fax_send_greeting']['pt-pt'] = "Saudação";
|
|
||||||
$text['label-fax_send_greeting']['ro-ro'] = "Salut";
|
|
||||||
$text['label-fax_send_greeting']['ru-ru'] = "Приветствие";
|
|
||||||
$text['label-fax_send_greeting']['sv-se'] = "Hälsning";
|
|
||||||
$text['label-fax_send_greeting']['uk-ua'] = "Вітання";
|
|
||||||
$text['label-fax_send_greeting']['zh-cn'] = "招标";
|
|
||||||
$text['label-fax_send_greeting']['ja-jp'] = "お問い合わせ";
|
|
||||||
$text['label-fax_send_greeting']['ko-kr'] = "주요연혁";
|
|
||||||
|
|
||||||
$text['label-fax_send_channels']['en-us'] = "Number of channels";
|
$text['label-fax_send_channels']['en-us'] = "Number of channels";
|
||||||
$text['label-fax_send_channels']['en-gb'] = "Number of channels";
|
$text['label-fax_send_channels']['en-gb'] = "Number of channels";
|
||||||
$text['label-fax_send_channels']['ar-eg'] = "عدد القنوات";
|
$text['label-fax_send_channels']['ar-eg'] = "عدد القنوات";
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@
|
||||||
}
|
}
|
||||||
$fax_local = $_POST["fax_local"] ?? null; //! @todo check in database
|
$fax_local = $_POST["fax_local"] ?? null; //! @todo check in database
|
||||||
$fax_description = $_POST["fax_description"];
|
$fax_description = $_POST["fax_description"];
|
||||||
$fax_send_greeting = $_POST["fax_send_greeting"] ?? null;
|
|
||||||
$fax_send_channels = $_POST["fax_send_channels"];
|
$fax_send_channels = $_POST["fax_send_channels"];
|
||||||
|
|
||||||
//restrict size of user data
|
//restrict size of user data
|
||||||
|
|
@ -345,9 +344,6 @@
|
||||||
if ($action == "update") {
|
if ($action == "update") {
|
||||||
$array['fax'][0]['fax_forward_number'] = !empty($fax_forward_number) ? $fax_forward_number : null;
|
$array['fax'][0]['fax_forward_number'] = !empty($fax_forward_number) ? $fax_forward_number : null;
|
||||||
}
|
}
|
||||||
if (permission_exists('fax_send_greeting')) {
|
|
||||||
$array['fax'][0]['fax_send_greeting'] = strlen($fax_send_greeting) != 0 ? $fax_send_greeting : null;
|
|
||||||
}
|
|
||||||
$array['fax'][0]['fax_send_channels'] = strlen($fax_send_channels) != 0 ? $fax_send_channels : null;
|
$array['fax'][0]['fax_send_channels'] = strlen($fax_send_channels) != 0 ? $fax_send_channels : null;
|
||||||
$array['fax'][0]['fax_description'] = $fax_description;
|
$array['fax'][0]['fax_description'] = $fax_description;
|
||||||
|
|
||||||
|
|
@ -438,7 +434,6 @@
|
||||||
$fax_toll_allow = $row["fax_toll_allow"];
|
$fax_toll_allow = $row["fax_toll_allow"];
|
||||||
$fax_forward_number = $row["fax_forward_number"];
|
$fax_forward_number = $row["fax_forward_number"];
|
||||||
$fax_description = $row["fax_description"];
|
$fax_description = $row["fax_description"];
|
||||||
$fax_send_greeting = $row["fax_send_greeting"];
|
|
||||||
$fax_send_channels = $row["fax_send_channels"];
|
$fax_send_channels = $row["fax_send_channels"];
|
||||||
}
|
}
|
||||||
unset($sql, $parameters, $row);
|
unset($sql, $parameters, $row);
|
||||||
|
|
@ -727,120 +722,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permission_exists('fax_send_greeting')) {
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
|
||||||
echo " ".$text['label-fax_send_greeting']."\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td class='vtable' align='left'>\n";
|
|
||||||
if (permission_exists('fax_extension_add') || permission_exists('fax_extension_edit')) {
|
|
||||||
echo "<script>\n";
|
|
||||||
echo "var Objs;\n";
|
|
||||||
echo "\n";
|
|
||||||
echo "function changeToInput(obj){\n";
|
|
||||||
echo " tb=document.createElement('INPUT');\n";
|
|
||||||
echo " tb.type='text';\n";
|
|
||||||
echo " tb.name=obj.name;\n";
|
|
||||||
echo " tb.setAttribute('class', 'formfld');\n";
|
|
||||||
echo " tb.setAttribute('style', 'width: 350px;');\n";
|
|
||||||
echo " tb.value=obj.options[obj.selectedIndex].value;\n";
|
|
||||||
echo " tbb=document.createElement('INPUT');\n";
|
|
||||||
echo " tbb.setAttribute('class', 'btn');\n";
|
|
||||||
echo " tbb.setAttribute('style', 'margin-left: 4px;');\n";
|
|
||||||
echo " tbb.type='button';\n";
|
|
||||||
echo " tbb.value=$('<div />').html('◁').text();\n";
|
|
||||||
echo " tbb.objs=[obj,tb,tbb];\n";
|
|
||||||
echo " tbb.onclick=function(){ Replace(this.objs); }\n";
|
|
||||||
echo " obj.parentNode.insertBefore(tb,obj);\n";
|
|
||||||
echo " obj.parentNode.insertBefore(tbb,obj);\n";
|
|
||||||
echo " obj.parentNode.removeChild(obj);\n";
|
|
||||||
echo "}\n";
|
|
||||||
echo "\n";
|
|
||||||
echo "function Replace(obj){\n";
|
|
||||||
echo " obj[2].parentNode.insertBefore(obj[0],obj[2]);\n";
|
|
||||||
echo " obj[0].parentNode.removeChild(obj[1]);\n";
|
|
||||||
echo " obj[0].parentNode.removeChild(obj[2]);\n";
|
|
||||||
echo "}\n";
|
|
||||||
echo "</script>\n";
|
|
||||||
echo "\n";
|
|
||||||
}
|
|
||||||
echo " <select name='fax_send_greeting' class='formfld' ".(permission_exists('fax_extension_add') || permission_exists('fax_extension_edit') ? "onchange='changeToInput(this);'" : null).">\n";
|
|
||||||
echo " <option></option>\n";
|
|
||||||
//recordings
|
|
||||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/")) {
|
|
||||||
$tmp_selected = false;
|
|
||||||
$files = Array();
|
|
||||||
echo "<optgroup label='Recordings'>\n";
|
|
||||||
while ($file = readdir($dh)) {
|
|
||||||
if ($file != "." && $file != ".." && $file[0] != '.') {
|
|
||||||
if (!is_dir($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file)) {
|
|
||||||
$selected = ($fax_send_greeting == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file && !empty($fax_send_greeting)) ? true : false;
|
|
||||||
echo " <option value='".escape($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$file)."' ".(($selected) ? "selected='selected'" : null).">".escape($file)."</option>\n";
|
|
||||||
if ($selected) { $tmp_selected = true; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($dh);
|
|
||||||
echo "</optgroup>\n";
|
|
||||||
}
|
|
||||||
//phrases
|
|
||||||
$sql = "select * from v_phrases where domain_uuid = :domain_uuid ";
|
|
||||||
$parameters['domain_uuid'] = $domain_uuid;
|
|
||||||
$database = new database;
|
|
||||||
$result = $database->select($sql, $parameters, 'all');
|
|
||||||
if (is_array($array) && @sizeof($array) != 0) {
|
|
||||||
echo "<optgroup label='Phrases'>\n";
|
|
||||||
foreach ($result as &$row) {
|
|
||||||
$selected = ($fax_send_greeting == "phrase:".$row["phrase_uuid"]) ? true : false;
|
|
||||||
echo " <option value='phrase:".escape($row["phrase_uuid"])."' ".($selected ? "selected='selected'" : null).">".escape($row["phrase_name"])."</option>\n";
|
|
||||||
if ($selected) { $tmp_selected = true; }
|
|
||||||
}
|
|
||||||
echo "</optgroup>\n";
|
|
||||||
}
|
|
||||||
unset($sql, $parameters, $result, $row);
|
|
||||||
//sounds
|
|
||||||
$file = new file;
|
|
||||||
$sound_files = $file->sounds();
|
|
||||||
if (is_array($sound_files)) {
|
|
||||||
echo "<optgroup label='Sounds'>\n";
|
|
||||||
foreach ($sound_files as $value) {
|
|
||||||
if (!empty($value)) {
|
|
||||||
if (substr($fax_send_greeting, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
|
|
||||||
$fax_send_greeting = substr($fax_send_greeting, 71);
|
|
||||||
}
|
|
||||||
$selected = ($fax_send_greeting == $value) ? true : false;
|
|
||||||
echo " <option value='".escape($value)."' ".($selected ? "selected='selected'" : null).">".escape($value)."</option>\n";
|
|
||||||
if ($selected) { $tmp_selected = true; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "</optgroup>\n";
|
|
||||||
}
|
|
||||||
//select
|
|
||||||
if (!empty($fax_send_greeting)) {
|
|
||||||
if (permission_exists('conference_center_add') || permission_exists('conference_center_edit')) {
|
|
||||||
if (!$tmp_selected) {
|
|
||||||
echo "<optgroup label='selected'>\n";
|
|
||||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$fax_send_greeting)) {
|
|
||||||
echo " <option value='".escape($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$fax_send_greeting)."' selected='selected'>".escape($ivr_menu_greet_long)."</option>\n";
|
|
||||||
}
|
|
||||||
else if (substr($fax_send_greeting, -3) == "wav" || substr($fax_send_greeting, -3) == "mp3") {
|
|
||||||
echo " <option value='".escape($fax_send_greeting)."' selected='selected'>".escape($fax_send_greeting)."</option>\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo " <option value='".escape($fax_send_greeting)."' selected='selected'>".escape($fax_send_greeting)."</option>\n";
|
|
||||||
}
|
|
||||||
echo "</optgroup>\n";
|
|
||||||
}
|
|
||||||
unset($tmp_selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo " </select>\n";
|
|
||||||
echo "<br />\n";
|
|
||||||
echo " ".$text['description-fax_send_greeting']."\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-fax_send_channels']."\n";
|
echo " ".$text['label-fax_send_channels']."\n";
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2015 - 2022
|
Portions created by the Initial Developer are Copyright (C) 2015-2023
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -71,7 +71,6 @@ if (!empty($result) && @sizeof($result) != 0) {
|
||||||
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
|
||||||
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
||||||
$fax_email_outbound_authorized_senders = strtolower($row["fax_email_outbound_authorized_senders"]);
|
$fax_email_outbound_authorized_senders = strtolower($row["fax_email_outbound_authorized_senders"]);
|
||||||
$fax_send_greeting = $row["fax_send_greeting"];
|
|
||||||
$fax_accountcode = $row["accountcode"];
|
$fax_accountcode = $row["accountcode"];
|
||||||
$fax_toll_allow = $row["fax_toll_allow"];
|
$fax_toll_allow = $row["fax_toll_allow"];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ if (!$included) {
|
||||||
if (permission_exists('fax_extension_view_domain')) {
|
if (permission_exists('fax_extension_view_domain')) {
|
||||||
//show all fax extensions
|
//show all fax extensions
|
||||||
$sql = "select fax_uuid, fax_extension, fax_caller_id_name, fax_caller_id_number, ";
|
$sql = "select fax_uuid, fax_extension, fax_caller_id_name, fax_caller_id_number, ";
|
||||||
$sql .= "fax_toll_allow, accountcode, fax_send_greeting ";
|
$sql .= "fax_toll_allow, accountcode ";
|
||||||
$sql .= "from v_fax ";
|
$sql .= "from v_fax ";
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
$sql .= "and fax_uuid = :fax_uuid ";
|
$sql .= "and fax_uuid = :fax_uuid ";
|
||||||
|
|
@ -85,7 +85,7 @@ if (!$included) {
|
||||||
else {
|
else {
|
||||||
//show only assigned fax extensions
|
//show only assigned fax extensions
|
||||||
$sql = "select f.fax_uuid, f.fax_extension, f.fax_caller_id_name, f.fax_caller_id_number, ";
|
$sql = "select f.fax_uuid, f.fax_extension, f.fax_caller_id_name, f.fax_caller_id_number, ";
|
||||||
$sql .= "f.fax_toll_allow, f.accountcode, f.fax_send_greeting ";
|
$sql .= "f.fax_toll_allow, f.accountcode ";
|
||||||
$sql .= "from v_fax as f, v_fax_users as u ";
|
$sql .= "from v_fax as f, v_fax_users as u ";
|
||||||
$sql .= "where f.fax_uuid = u.fax_uuid ";
|
$sql .= "where f.fax_uuid = u.fax_uuid ";
|
||||||
$sql .= "and f.domain_uuid = :domain_uuid ";
|
$sql .= "and f.domain_uuid = :domain_uuid ";
|
||||||
|
|
@ -105,7 +105,6 @@ if (!$included) {
|
||||||
$fax_caller_id_number = $row["fax_caller_id_number"];
|
$fax_caller_id_number = $row["fax_caller_id_number"];
|
||||||
$fax_toll_allow = $row["fax_toll_allow"];
|
$fax_toll_allow = $row["fax_toll_allow"];
|
||||||
$fax_accountcode = $row["accountcode"];
|
$fax_accountcode = $row["accountcode"];
|
||||||
$fax_send_greeting = $row["fax_send_greeting"];
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!permission_exists('fax_extension_view_domain')) {
|
if (!permission_exists('fax_extension_view_domain')) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue