Mailing List Archive

svn commit: r433052 - /spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm
Author: felicity
Date: Sun Aug 20 14:22:25 2006
New Revision: 433052

URL: http://svn.apache.org/viewvc?rev=433052&view=rev
Log:
bug 4843: skip text/calendar parts when generating the body text arrays

Modified:
spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm?rev=433052&r1=433051&r2=433052&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message.pm Sun Aug 20 14:22:25 2006
@@ -862,6 +862,10 @@
for(my $pt = 0 ; $pt <= $#parts ; $pt++ ) {
my $p = $parts[$pt];

+ # bug 4843: skip text/calendar parts since they're usually an attachment
+ # and not displayed
+ next if ($p->{'type'} eq 'text/calendar');
+
# put a blank line between parts ...
$text .= "\n" if ( $text );

@@ -922,6 +926,10 @@
for(my $pt = 0 ; $pt <= $#parts ; $pt++ ) {
my $p = $parts[$pt];

+ # bug 4843: skip text/calendar parts since they're usually an attachment
+ # and not displayed
+ next if ($p->{'type'} eq 'text/calendar');
+
# put a blank line between parts ...
$text .= "\n" if ( $text );

@@ -976,6 +984,10 @@
for(my $pt = 0 ; $pt <= $#parts ; $pt++ ) {
my $p = $parts[$pt];

+ # bug 4843: skip text/calendar parts since they're usually an attachment
+ # and not displayed
+ next if ($p->{'type'} eq 'text/calendar');
+
# put a blank line between parts ...
$text .= "\n" if ( $text );

@@ -1019,6 +1031,10 @@

# Go through each part
for(my $pt = 0 ; $pt <= $#parts ; $pt++ ) {
+ # bug 4843: skip text/calendar parts since they're usually an attachment
+ # and not displayed
+ next if ($parts[$pt]->{'type'} eq 'text/calendar');
+
push(@{$self->{text_decoded}}, "\n") if ( @{$self->{text_decoded}} );
push(@{$self->{text_decoded}}, split_into_array_of_short_lines($parts[$pt]->decode()));
}