fix fax multiple files. (#1963)

Added some changes from ICR regarding the text/plain emails, added a
uuid to the file name when getting saved to the FS in the event that
multiple emails come in with the same exact file name and also reset
the tif_files in fax_send as it was just adding to the end of the array
and creating bad tiffcp commands.
This commit is contained in:
Chris Black
2016-09-30 15:47:22 -06:00
committed by FusionPBX
parent 7bfcf7eb39
commit 0d24ad70e7
2 changed files with 9 additions and 8 deletions
+1
View File
@@ -313,6 +313,7 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
// process uploaded or emailed files (if any)
$fax_page_count = 0;
$_files = (!$included) ? $_FILES['fax_files'] : $emailed_files;
unset($tif_files);
foreach ($_files['tmp_name'] as $index => $fax_tmp_name) {
$uploaded_file = (!$included) ? is_uploaded_file($fax_tmp_name) : true;
if ( $uploaded_file && $_files['error'][$index] == 0 && $_files['size'][$index] > 0 ) {