diff --git a/app/fax/fax_send.php b/app/fax/fax_send.php
index 79b6931cef..2cf88982d8 100644
--- a/app/fax/fax_send.php
+++ b/app/fax/fax_send.php
@@ -317,15 +317,14 @@ if (!function_exists('fax_split_dtmf')) {
chdir($dir_fax_temp);
//convert pdf to tif
- $gs = exec('which gs');
- $cmd = $gs . "-q -r".$gs_r." -g".$gs_g." -dBATCH -dPDFFitPage -dNOSAFER -dNOPAUSE -dBATCH -sOutputFile=".correct_path($fax_name).".tif -sDEVICE=tiffg4 -Ilib stocht.ps -c \"{ .75 gt { 1 } { 0 } ifelse} settransfer\" -- ".correct_path($fax_name).".pdf -c quit";
+ $cmd = exec('which gs')." -q -r".$gs_r." -g".$gs_g." -dBATCH -dPDFFitPage -dNOSAFER -dNOPAUSE -dBATCH -sOutputFile=".correct_path($fax_name).".tif -sDEVICE=tiffg4 -Ilib stocht.ps -c \"{ .75 gt { 1 } { 0 } ifelse} settransfer\" -- ".correct_path($fax_name).".pdf -c quit";
// echo($cmd . "
\n");
exec($cmd);
@unlink($dir_fax_temp.'/'.$fax_name.'.pdf');
}
- $tiffinfo = exec('which tiffinfo');
- $cmd = "tiffinfo ".correct_path($dir_fax_temp.'/'.$fax_name).".tif | grep \"Page Number\" | grep -c \"P\"";
+ //get the page count
+ $cmd = exec('which tiffinfo')." ".correct_path($dir_fax_temp.'/'.$fax_name).".tif | grep \"Page Number\" | grep -c \"P\"";
// echo($cmd . "
\n");
$tif_page_count = exec($cmd);
if ($tif_page_count != '') {
@@ -569,8 +568,7 @@ if (!function_exists('fax_split_dtmf')) {
//combine tif files into single multi-page tif
if (is_array($tif_files) && sizeof($tif_files) > 0) {
- $tiffcp = exec('which tiffcp');
- $cmd = $tiffcp. " -c none ";
+ $cmd = exec('which tiffcp')." -c none ";
foreach ($tif_files as $tif_file) {
$cmd .= correct_path($tif_file) . ' ';
}
@@ -583,8 +581,7 @@ if (!function_exists('fax_split_dtmf')) {
}
//generate pdf from tif
- $tiff2pdf = exec('which tiff2pdf');
- $cmd = $tiff2pdf . ' -u i -p '.$fax_page_size.
+ $cmd = exec('which tiff2pdf').' -u i -p '.$fax_page_size.
' -w '.$page_width.
' -l '.$page_height.
' -f -o '.