Update fax_send.php

Need to set the working dirctory to /tmp for unix systems.
This commit is contained in:
FusionPBX 2016-12-17 12:25:46 -07:00 committed by GitHub
parent 7e47bb6446
commit 9c53fdb3ef
1 changed files with 3 additions and 1 deletions

View File

@ -359,7 +359,9 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
//convert uploaded file to pdf, if necessary
if ($fax_file_extension != "pdf" && $fax_file_extension != "tif") {
chdir($dir_fax_temp);
exec("libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
if ($IS_WINDOWS) { $command = ''; } else { $command = 'export HOME=/tmp && '; }
$command .= "libreoffice --headless --convert-to pdf --outdir ".$dir_fax_temp." ".$dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension;
exec($command);
@unlink($dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
}