From: <jgr...@us...> - 2003-02-24 23:09:25
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv26589/Classifier Modified Files: Bayes.pm MailParse.pm Log Message: Major update to the history caching code that makes POPFile History a hell of a lot faster by being a real cache and not the lame one it was before; Stan, this might have undone your last & fix check in because of the size of changes I was making; I fixed a nasty bug where we were leaking file handles in class files when reclassifying or undoing. Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** Bayes.pm 21 Feb 2003 20:15:56 -0000 1.101 --- Bayes.pm 24 Feb 2003 23:08:47 -0000 1.102 *************** *** 835,839 **** if ( $self->{configuration}->{configuration}{subject} ) { # Don't add the classification unless it is not present ! if ( !( $msg_subject =~ /\[$classification\]/ ) && ( $self->{parameters}{$classification}{subject} == 1 ) ) { $msg_subject = " [$classification]$msg_subject"; } --- 835,841 ---- if ( $self->{configuration}->{configuration}{subject} ) { # Don't add the classification unless it is not present ! if ( !( $msg_subject =~ /\[$classification\]/ ) && ! ( $self->{parameters}{$classification}{subject} == 1 ) && ! ( $self->{parameters}{$classification}{quarantine} == 0 ) ) { $msg_subject = " [$classification]$msg_subject"; } *************** *** 849,853 **** # Add the XTC header ! $msg_head_after .= "X-Text-Classification: $classification$eol" if ( $self->{configuration}->{configuration}{xtc} ); # Add the XPL header --- 851,856 ---- # Add the XTC header ! $msg_head_after .= "X-Text-Classification: $classification$eol" if ( ( $self->{configuration}->{configuration}{xtc} ) && ! ( $self->{parameters}{$classification}{quarantine} == 0 ) ); # Add the XPL header *************** *** 860,864 **** $xpl .= ":$self->{configuration}->{configuration}{ui_port}/jump_to_message?view=$temp_file>$eol"; ! if ( $self->{configuration}->{configuration}{xpl} ) { $msg_head_after .= 'X-POPFile-Link: ' . $xpl; } --- 863,867 ---- $xpl .= ":$self->{configuration}->{configuration}{ui_port}/jump_to_message?view=$temp_file>$eol"; ! if ( $self->{configuration}->{configuration}{xpl} && ( $self->{parameters}{$classification}{quarantine} == 0 ) ) { $msg_head_after .= 'X-POPFile-Link: ' . $xpl; } *************** *** 878,881 **** --- 881,892 ---- print $client "To: $self->{parser}->{to}$eol"; print $client "Date: $self->{parser}->{date}$eol"; + if ( $self->{configuration}->{configuration}{subject} ) { + # Don't add the classification unless it is not present + if ( !( $msg_subject =~ /\[$classification\]/ ) && + ( $self->{parameters}{$classification}{subject} == 1 ) && + ( $self->{parameters}{$classification}{quarantine} == 0 ) ) { + $msg_subject = " [$classification]$msg_subject"; + } + } print $client "Subject:$msg_subject$eol"; print $client "X-Text-Classification: $classification$eol" if ( $self->{configuration}->{configuration}{xtc} ); Index: MailParse.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** MailParse.pm 21 Feb 2003 18:55:10 -0000 1.88 --- MailParse.pm 24 Feb 2003 23:08:48 -0000 1.89 *************** *** 423,426 **** --- 423,432 ---- print "Set html font color to $self->{htmlfontcolor}\n" if ( $self->{debug} ); } + + if ( ( $attribute =~ /^text$/i ) && ( $tag =~ /^body$/i ) ) { + update_word( $self, $value, $encoded, $quote, $end_quote, '' ); + $self->{htmlfontcolor} = map_color($self, $value); + print "Set html font color to $self->{htmlfontcolor}\n" if ( $self->{debug} ); + } # Tags with background colors |