Add fax to the add fax_files table if the file exists

This commit is contained in:
FusionPBX 2025-03-19 13:27:29 -06:00 committed by GitHub
parent c75e573e84
commit bde4163c25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 74 additions and 75 deletions

View File

@ -48,6 +48,7 @@
require "resources.functions.explode"; require "resources.functions.explode";
require "resources.functions.count"; require "resources.functions.count";
require "resources.functions.send_mail"; require "resources.functions.send_mail";
require "resources.functions.file_exists";
--check if windows --check if windows
local IS_WINDOWS = (package.config:sub(1,1) == '\\') local IS_WINDOWS = (package.config:sub(1,1) == '\\')
@ -322,8 +323,7 @@
dbh:query(sql, params); dbh:query(sql, params);
--add the fax files --add the fax files
if (fax_success ~= nil) then if (file_exists(fax_file)) then
if (fax_success =="1") then
if (storage_type == "base64") then if (storage_type == "base64") then
--include the file io --include the file io
local file = require "resources.functions.file" local file = require "resources.functions.file"
@ -400,7 +400,6 @@
result = dbh:query(sql, params); result = dbh:query(sql, params);
end end
end end
end
--fax to email --fax to email
cmd = quote(shell_esc(php_dir).."/"..shell_esc(php_bin)).." "..quote(shell_esc(document_root).."/secure/fax_to_email.php").." "; cmd = quote(shell_esc(php_dir).."/"..shell_esc(php_bin)).." "..quote(shell_esc(document_root).."/secure/fax_to_email.php").." ";