This commit is contained in:
markjcrane
2015-12-04 17:35:27 -07:00
10 changed files with 23 additions and 21 deletions

View File

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

View File

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

View File

@@ -135,7 +135,7 @@ else {
if (imap_delete($connection, $email_id, FT_UID)) {
if (imap_expunge($connection)) {
//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']);
//redirect user
$_SESSION["message"] = $text['message-delete'];

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'];

View File

@@ -174,12 +174,7 @@
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$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';
}
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_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_group"] = "1";
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
$y++;

View File

@@ -309,6 +309,8 @@ if(!$install_step) { $install_step = 'select_language'; }
$switch = new install_switch($global_settings);
//$switch->debug = true;
//$system->debug = true;
$switch->echo_progress = true;
$system->echo_progress = true;
$system->install_phase_1();
$switch->install_phase_1();
$system->install_phase_2();

View File

@@ -35,6 +35,7 @@ include "root.php";
protected $dbh;
public $debug = false;
public $echo_progress = false;
public $install_language = 'en-us';
public $admin_username;
@@ -71,7 +72,9 @@ include "root.php";
}
function write_progress($message) {
echo "$message\n";
if($this->echo_progress){
echo "$message\n";
}
}
function install_phase_1() {

View File

@@ -33,6 +33,7 @@ include "root.php";
protected $dbh;
public $debug = false;
public $echo_progress = false;
function __construct($global_settings) {
if(is_null($global_settings)){
@@ -63,7 +64,9 @@ include "root.php";
}
function write_progress($message) {
echo "$message\n";
if($this->echo_progress){
echo "$message\n";
}
}
//$options '-n' --no-clobber

View File

@@ -53,7 +53,7 @@ if (sizeof($_POST) > 0) {
// run source update
if ($do["source"] && permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx")) {
chdir("/var/www/fusionpbx/");
chdir($_SERVER["DOCUMENT_ROOT"]);
exec("git pull", $response_source_update);
$update_failed = true;
if (sizeof($response_source_update) > 0) {

View File

@@ -90,7 +90,7 @@ if freeswitch then
if file then
freeswitch.email(address, address, mail_headers, body, file)
else
freeswitch.email(address, address, mail_headers, body, file)
freeswitch.email(address, address, mail_headers, body)
end
end
end