Small patch for RT::Transaction::ContentObj

When Quoting some transaction with multiple text/plain attachments
(one for message, and some other as named attachment) wrong
attachment can be selected.
Patch forces attachments w/o name to be selected as source for
quoting.
— Transaction_Overlay.pm~ Tue Apr 8 12:45:32 2008
+++ Transaction_Overlay.pm Tue Apr 8 12:45:32 2008
@@ -388,6 +388,7 @@
elsif ( $Attachment->ContentType() =~ ‘^multipart/’ ) {
my $plain_parts = $Attachment->Children();
$plain_parts->ContentType( VALUE => ($PreferredContentType || ‘text/plain’) );

  •    $plain_parts->Limit(FIELD => 'Filename', VALUE => '');
    
       # If we actully found a part, return its content
       if ( $plain_parts->First && $plain_parts->First->Content ne '' ) {
    

Boris Lytochkin,
JSC e-port, Moscow

ContentObj.patch (526 Bytes)

When Quoting some transaction with multiple text/plain attachments
(one for message, and some other as named attachment) wrong
attachment can be selected.
Patch forces attachments w/o name to be selected as source for
quoting.

I wonder if it would make more sense to look at the Content-
Disposition: header (so we could do smart things with text attachments
the original sender intentionally inlined.)

thoughts?

PGP.sig (186 Bytes)