Change. Use path with domain name for faxes for single tenant installation.

This commit is contained in:
Alexey Melnichuk 2015-12-04 12:57:30 +03:00
parent 7c77e1cacd
commit c543c42ffa
5 changed files with 5 additions and 15 deletions

View File

@ -53,12 +53,7 @@ else {
} }
//set the fax directory //set the fax directory
if (count($_SESSION["domains"]) > 1) { $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
}
else {
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax';
}
//get the fax extension //get the fax extension
if (strlen($fax_extension) > 0) { if (strlen($fax_extension) > 0) {

View File

@ -86,7 +86,7 @@ else {
} }
//set the fax directory //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'];
//download the fax //download the fax
if ($_GET['a'] == "download") { if ($_GET['a'] == "download") {

View File

@ -135,7 +135,7 @@ else {
if (imap_delete($connection, $email_id, FT_UID)) { if (imap_delete($connection, $email_id, FT_UID)) {
if (imap_expunge($connection)) { if (imap_expunge($connection)) {
//clean up local inbox copy //clean up local inbox copy
$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'];
@unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$attachment[0]['filename']); @unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$attachment[0]['filename']);
//redirect user //redirect user
$_SESSION["message"] = $text['message-delete']; $_SESSION["message"] = $text['message-delete'];

View File

@ -101,7 +101,7 @@ if (!$included) {
} }
//set the fax directory //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 // set fax cover font to generate pdf
$fax_cover_font = $_SESSION['fax']['cover_font']['text']; $fax_cover_font = $_SESSION['fax']['cover_font']['text'];

View File

@ -174,12 +174,7 @@
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid; $dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "rxfax"; $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "rxfax";
if (count($_SESSION["domains"]) > 1) { $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'].'/'.$this->fax_extension.'/inbox/'.$this->forward_prefix.'${last_fax}.tif';
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'].'/'.$this->fax_extension.'/inbox/'.$this->forward_prefix.'${last_fax}.tif';
}
else {
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = $_SESSION['switch']['storage']['dir'].'/fax/'.$this->fax_extension.'/inbox/'.$this->forward_prefix.'${last_fax}.tif';
}
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1"; $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = "1";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10; $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
$y++; $y++;