[rt-users] [RT 3.6.6] Small patch for RT::Transaction::ContentObj

Jesse Vincent jesse at bestpractical.com
Tue Apr 8 12:07:22 EDT 2008


On Apr 8, 2008, at 5:29 AM, Boris Lytochkin wrote:
>
> 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?

> ===============================================================
> --- 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>_______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080408/caf75a8d/attachment.sig>


More information about the rt-users mailing list