[Rt-commit] [svn] r1240 - in rt/branches/3.2-RELEASE/lib/RT: . Action

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Wed Jul 14 11:34:00 EDT 2004


Author: alexmv
Date: Wed Jul 14 11:34:00 2004
New Revision: 1240

Modified:
   rt/branches/3.2-RELEASE/lib/RT/Action/SendEmail.pm
   rt/branches/3.2-RELEASE/lib/RT/Links_Overlay.pm
Log:
RT-Ticket: 5882
RT-Status: resolved
RT-Action: correspond

 * Skip links whose base or target is local and the endpoint is a
   deleted ticket
 * Typo fix in comment in RT::Action::SendMail



Modified: rt/branches/3.2-RELEASE/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.2-RELEASE/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.2-RELEASE/lib/RT/Action/SendEmail.pm	Wed Jul 14 11:34:00 2004
@@ -116,7 +116,7 @@
       if ( !$MIMEObj->head->get('Bcc') && $self->{'Bcc'} && @{ $self->{'Bcc'} } );
 
     # PseudoTo	(fake to headers) shouldn't get matched for message recipients.
-    # If we don't have any 'To' header (but do have other reciepients), drop in
+    # If we don't have any 'To' header (but do have other recipients), drop in
     # the pseudo-to header.
     $self->SetHeader( 'To', join ( ', ', @{ $self->{'PseudoTo'} } ) )
       if ( $self->{'PseudoTo'} && ( @{ $self->{'PseudoTo'} } )

Modified: rt/branches/3.2-RELEASE/lib/RT/Links_Overlay.pm
==============================================================================
--- rt/branches/3.2-RELEASE/lib/RT/Links_Overlay.pm	(original)
+++ rt/branches/3.2-RELEASE/lib/RT/Links_Overlay.pm	Wed Jul 14 11:34:00 2004
@@ -121,5 +121,29 @@
 }
 
 # }}}
+
+
+# {{{ Next
+sub Next {
+    my $self = shift;
+ 	
+    my $Link = $self->SUPER::Next();
+    if ((defined($Link)) and (ref($Link))) {
+        # Skip links to local objects thast are deleted
+        if      ($Link->TargetURI->IsLocal and UNIVERSAL::isa($Link->TargetObj,"RT::Ticket")
+                 and $Link->TargetObj->__Value('status') eq "deleted") {
+            return $self->Next;
+        } elsif ($Link->BaseURI->IsLocal   and UNIVERSAL::isa($Link->BaseObj,"RT::Ticket")
+                 and $Link->BaseObj->__Value('status') eq "deleted") {
+            return $self->Next;
+        } else {
+            return $Link;
+        }
+    } else {
+        return undef;
+    }
+}
+
+# }}}
 1;
 


More information about the Rt-commit mailing list