[Bps-public-commit] rt1-to-rt3 branch, master, updated. 3571ebaaca61065cf26de7782d98ed62c7b200a2
jesse
jesse at bestpractical.com
Mon Dec 28 15:27:20 EST 2009
The branch, master has been updated
via 3571ebaaca61065cf26de7782d98ed62c7b200a2 (commit)
from 1dff3a74ae5915a452165baafae46bdb44691b32 (commit)
Summary of changes:
lib/RT/Extension/Converter/RT3.pm | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 3571ebaaca61065cf26de7782d98ed62c7b200a2
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Mon Dec 14 12:20:16 2009 -0500
Updated to deal with rt-generated comments from RT1.
diff --git a/lib/RT/Extension/Converter/RT3.pm b/lib/RT/Extension/Converter/RT3.pm
index f6bbb7f..21f6bf8 100644
--- a/lib/RT/Extension/Converter/RT3.pm
+++ b/lib/RT/Extension/Converter/RT3.pm
@@ -597,13 +597,20 @@ sub _process_transaction_file {
my $self = shift;
my %args = @_;
open (FILE, "<", $args{File} ) or die "can't open [".$args{File}."] $!";
- my ($body, $header) = split( /--- Headers Follow ---\s*[\r\n]*/gism , join("",<FILE>));
+ my $content = join("",<FILE>);
+ my ($body, $header) = split( /--- Headers Follow ---\s*[\r\n]*/gism , $content);
my $parser = MIME::Parser->new;
$parser->output_to_core(1);
$parser->extract_nested_messages(0);
+ if (! $header) {
+ $header = "Content-Type: text\/plain";
+ $body =~ s/^[\r\n]*//;
+ }
+
my $MIMEObj = $parser->parse_data( $header."\n\n".$body);
return $MIMEObj;
-}
+}
+
=head3 _load_or_create_user
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list