mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update fax_files.php
Minor changes to the select statement.
This commit is contained in:
@@ -201,6 +201,7 @@
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
@@ -211,7 +212,17 @@
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(fax_file_uuid)', '*', $sql);
|
||||
$sql = "select * from v_fax_files ";
|
||||
$sql .= "where fax_uuid = :fax_uuid ";
|
||||
$sql .= "and domain_uuid = :domain_uuid ";
|
||||
if ($_REQUEST['box'] == 'inbox') {
|
||||
$sql .= "and fax_mode = 'rx' ";
|
||||
}
|
||||
if ($_REQUEST['box'] == 'sent') {
|
||||
$sql .= "and fax_mode = 'tx' ";
|
||||
}
|
||||
$parameters['fax_uuid'] = $fax_uuid;
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$sql .= order_by($order_by, $order, 'fax_date', 'desc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
@@ -351,6 +362,7 @@
|
||||
//generate pdf from tif
|
||||
$cmd_tif2pdf = "tiff2pdf -u i -p ".$page_size." -w ".$page_width." -l ".$page_height." -f -o ".$dir_fax.'/'.$file_name.".pdf ".$dir_fax.'/'.$file_name.".tif";
|
||||
exec($cmd_tif2pdf);
|
||||
//echo $cmd_tif2pdf."<br >\n";
|
||||
//clean up temporary files, if any
|
||||
if (file_exists($dir_fax_temp.'/'.$file_name.'.pdf')) { @unlink($dir_fax_temp.'/'.$file_name.'.pdf'); }
|
||||
if (file_exists($dir_fax_temp.'/'.$file_name.'.tif')) { @unlink($dir_fax_temp.'/'.$file_name.'.tif'); }
|
||||
|
||||
Reference in New Issue
Block a user