Fix. send fax by user listed in fax server list

This commit is contained in:
Alexey Melnichuk
2015-12-04 21:09:25 +03:00
parent 7c77e1cacd
commit 5b1fef316a

View File

@@ -58,13 +58,17 @@ if (!$included) {
$fax_uuid = check_str($_REQUEST["id"]);
if (if_group("superadmin") || if_group("admin")) {
//show all fax extensions
$sql = "select * from v_fax ";
$sql = "select fax_uuid, fax_extension, fax_caller_id_name, fax_caller_id_number, ";
$sql .= "accountcode, fax_send_greeting ";
$sql .= "from v_fax ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and fax_uuid = '$fax_uuid' ";
}
else {
//show only assigned fax extensions
$sql = "select * from v_fax as f, v_fax_users as u ";
$sql = "select f.fax_uuid, f.fax_extension, f.fax_caller_id_name, f.fax_caller_id_number, ";
$sql .= "f.accountcode, f.fax_send_greeting ";
$sql .= "from v_fax as f, v_fax_users as u ";
$sql .= "where f.fax_uuid = u.fax_uuid ";
$sql .= "and f.domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and f.fax_uuid = '$fax_uuid' ";
@@ -101,7 +105,7 @@ if (!$included) {
}
//set the fax directory
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.((count($_SESSION["domains"]) > 1) ? '/'.$_SESSION['domain_name'] : null);
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
// set fax cover font to generate pdf
$fax_cover_font = $_SESSION['fax']['cover_font']['text'];
@@ -703,6 +707,7 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
foreach ($fax_numbers as $fax_number) {
$dial_string = $common_dial_string;
fax_split_dtmf($fax_number, $fax_dtmf);
//prepare the fax command