[Rt-commit] rt branch, 4.0/mail-threading, updated. rt-4.0.2-120-g9d36c09

Alex Vandiver alexmv at bestpractical.com
Thu Sep 29 17:17:05 EDT 2011


The branch, 4.0/mail-threading has been updated
       via  9d36c097d7cddbd983713591451b2464dbdd720f (commit)
      from  93d452ac5739cc2d7daa9f705d73fb770c6eeb83 (commit)

Summary of changes:
 lib/RT/Action/SendEmail.pm |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 9d36c097d7cddbd983713591451b2464dbdd720f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Sep 29 17:16:57 2011 -0400

    Reorganize "if" statement to be slightly clearer

diff --git a/lib/RT/Action/SendEmail.pm b/lib/RT/Action/SendEmail.pm
index b121128..5a92570 100644
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@ -1009,17 +1009,17 @@ Set References and In-Reply-To headers for this message.
 
 sub SetReferencesHeaders {
     my $self = shift;
-    my ( @in_reply_to, @references, @msgid );
 
-    if ( my $top = $self->TransactionObj->Message->First ) {
-        @in_reply_to = split( /\s+/m, $top->GetHeader('In-Reply-To') || '' );
-        @references  = split( /\s+/m, $top->GetHeader('References')  || '' );
-        @msgid       = split( /\s+/m, $top->GetHeader('Message-ID')  || '' );
-    } else {
+    my $top = $self->TransactionObj->Message->First;
+    unless ( $top ) {
         $self->SetHeader( References => $self->PseudoReference );
         return (undef);
     }
 
+    my @in_reply_to = split( /\s+/m, $top->GetHeader('In-Reply-To') || '' );
+    my @references  = split( /\s+/m, $top->GetHeader('References')  || '' );
+    my @msgid       = split( /\s+/m, $top->GetHeader('Message-ID')  || '' );
+
     # There are two main cases -- this transaction was created with
     # the RT Web UI, and hence we want to *not* append its Message-ID
     # to the References and In-Reply-To.  OR it came from an outside

-----------------------------------------------------------------------


More information about the Rt-commit mailing list