220a221 > $t_mail_debug = config_get( 'mail_debug' ); 221a223,224 > // get stamp of (prev) last processed mail > $t_mail_last_processed = config_get( 'pop3_last_mail_ds',null ,null ,$p_account['id']); 251a255 > if ( null == $t_mail_last_processed || $t_mail['Datestamp'] > $t_mail_last_processed ) { 253a258,263 > $t_mail_last_processed = $t_mail['Datestamp']; > } else { > if ( $t_mail_debug ) { > echo "\nMail skipped - to old against last checked mail!\n"; > } > } 261a272,273 > // save stamp of last processed mail > config_set( 'pop3_last_mail_ds', $t_mail_last_processed , null, $p_account['id']); 287a300,301 > $t_mail['Datestamp'] = strtotime($t_mp->date()); > 302c316 < if ( true == $t_mail_use_bug_priority ) { --- > / / FIXED( wb ) 302a317 > if ( $t_mail_use_bug_priority ) { 308,309c323,324 < if ( true == $t_mail_additional ) { < $ t_mail [ ' X-Mantis-Complete'] = $t_msg; --- > / / FIXED( wb ) > if ( $ t_mail_additional ) { 309a325 > $t_mail['X-Mantis-Complete'] = $p_mail; 383c401 < function mail_add_file( $p_bug_id, $p_part, $number ) { --- > function mail_add_file( $p_bug_id, $p_part, $number = 0 ) { 384a403,405 > $t_attachment_directory = config_get( 'mail_tmp_directory' ); > > if ( is_dir($t_attachment_directory) && is_writeable($t_attachment_directory) ) { 386c407 < $t_file_name = ' /tmp/'.$p_part['name']; --- > $t_file_name = $t_attachment_directory . ' /'.$p_part['name']; 388c409 < file_add($ p_bug_id, $t_file_name, $number . " -".$p_part['name'], $p_part['ctype'], 'bug') ; --- > if($ number > 0 ) { 388a410,413 > file_add($p_bug_id, $t_file_name, $number."_".$p_part['name'], $p_part['ctype'], 'bug'); > } else { > file_add($p_bug_id, $t_file_name, $p_part['name'], $p_part['ctype'], 'bug'); > } 391a417 > } 395c421 < $t_mail_directory = config_get( 'mail_directory' ); --- > $t_mail_directory = config_get( 'mail_tmp_directory' ); 443a470,473 > # FIX(wb) Wo made (optionally) the note (From) > if ( $t_mail_save_from ) { > bugnote_add ( $t_bug_id, "(".$p_mail['From']."):\n".$p_mail['X-Mantis-Body'] ); > } else { 444a475 > } 456c487 < # Add files --- > # Add files, number removed 458c489 < $number = 1; --- > # $number = 1; 460c491 < mail_add_file ( $t_bug_id, $part, $number ); --- > mail_add_file ( $t_bug_id, $part );