diff --git a/app/fax/fax_emails.php b/app/fax/fax_emails.php index f89f44feb3..68790fd13e 100644 --- a/app/fax/fax_emails.php +++ b/app/fax/fax_emails.php @@ -65,10 +65,6 @@ if (is_array($result) && @sizeof($result) != 0) { $event_socket['password'] = $row['event_socket_password']; unset($sql, $row); - $fax_send_mode_default = $_SESSION['fax']['send_mode']['text']; - if(strlen($fax_send_mode_default) == 0){ - $fax_send_mode_default = 'direct'; - } $fax_cover_font_default = $_SESSION['fax']['cover_font']['text']; $fax_allowed_extension_default = arr_to_map($_SESSION['fax']['allowed_extension']); @@ -105,18 +101,13 @@ if (is_array($result) && @sizeof($result) != 0) { $_SESSION = $default_settings; load_domain_settings($domain_uuid); - $fax_send_mode = $_SESSION['fax']['send_mode']['text']; - if(strlen($fax_send_mode) == 0){ - $fax_send_mode = $fax_send_mode_default; - } - $fax_cover_font = $_SESSION['fax']['cover_font']['text']; if(strlen($fax_cover_font) == 0){ $fax_cover_font = $fax_cover_font_default; } $fax_allowed_extension = arr_to_map($_SESSION['fax']['allowed_extension']); - if($fax_allowed_extension == false){ + if($fax_allowed_extension == false) { $fax_allowed_extension = $fax_allowed_extension_default; } @@ -241,7 +232,7 @@ if (is_array($result) && @sizeof($result) != 0) { $fax_message = str_replace("\r\n\r\n", "\r\n", $fax_message); } - // set fax directory (used for pdf creation - cover and/or attachments) + //set fax directory (used for pdf creation - cover and/or attachments) $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.(($domain_name != '') ? '/'.$domain_name : null); //handle attachments (if any) @@ -252,11 +243,11 @@ if (is_array($result) && @sizeof($result) != 0) { $fax_file_extension = pathinfo($attachment['name'], PATHINFO_EXTENSION); //block unknown files - if ($fax_file_extension == '') {continue; } + if ($fax_file_extension == '') { continue; } //block unauthorized files if (!$fax_allowed_extension['.' . $fax_file_extension]) { continue; } //support only attachments - //if($attachment['disposition'] != 'attachment'){ continue; } + //if($attachment['disposition'] != 'attachment') { continue; } //store attachment in local fax temp folder $uuid_filename = uuid(); @@ -285,7 +276,7 @@ if (is_array($result) && @sizeof($result) != 0) { $cwd = getcwd(); $included = true; require("fax_send.php"); - if($cwd){ + if($cwd) { chdir($cwd); }