[Rt-commit] r7322 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Thu Mar 22 21:38:02 EDT 2007


Author: ruz
Date: Thu Mar 22 21:38:02 2007
New Revision: 7322

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm

Log:
 r4774 at cubic-pc:  cubic | 2007-03-21 16:09:16 +0300
 * use LimitNotEmpty method of RT::Attachments


Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm	Thu Mar 22 21:38:02 2007
@@ -293,6 +293,8 @@
         FIELD => 'TransactionId',
         VALUE => $self->TransactionObj->Id
     );
+    # Don't attach anything blank
+    $attachments->LimitNotEmpty;
     $attachments->OrderBy( FIELD => 'id');
 
     # We want to make sure that we don't include the attachment that's
@@ -311,10 +313,6 @@
 
     # attach any of this transaction's attachments
     while ( my $attach = $attachments->Next ) {
-
-        # Don't attach anything blank
-        next unless ( $attach->ContentLength );
-
         $MIMEObj->make_multipart('mixed');
         $MIMEObj->attach(
             Type     => $attach->ContentType,


More information about the Rt-commit mailing list