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 ) if -statement 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- statement 309a325,326 > if ( $t_mail_additional ) { > $t_mail['X-Mantis-Complete'] = $p_mail; 384c401 < function mail_add_file( $p_bug_id, $p_part, $number ) { --- > function mail_add_file( $p_bug_id, $p_part, $number = 0 ) { 385a403,405 > $t_attachment_directory = config_get( 'mail_tmp_directory' ); > > if ( is_dir($t_attachment_directory) && is_writeable($t_attachment_directory) ) { 387c407 < $t_file_name = ' /tmp/'.$p_part['name']; --- > $t_file_name = $t_attachment_directory . ' /'.$p_part['name']; 389c409 < file_add($ p_bug_id, $t_file_name, $number . " -".$p_part['name'], $p_part['ctype'], 'bug') ; --- > if($ number > 0 ) { 389a410,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'); > } 392a417 > } 396c421 < $ t_mail_directory = config_get( ' mail_directory' ) ; --- > # FIXED ( wb ) correct var 396a422 > $t_mail_directory = config_get( 'mail_tmp_directory' ); 444a471,474 > # (wb) Who 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 { 445a476 > } 457c488 < # Add files --- > # Add files, re-numbering removed 459c490 < $number = 1; --- > # $number = 1; 461c492 < mail_add_file ( $t_bug_id, $part, $number ); --- > mail_add_file ( $t_bug_id, $part );