[Rt-commit] r6577 - in rt/branches/3.6-RELEASE: . lib/RT/Action
jesse at bestpractical.com
jesse at bestpractical.com
Fri Dec 1 14:00:25 EST 2006
Author: jesse
Date: Fri Dec 1 14:00:23 2006
New Revision: 6577
Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
Log:
r45540 at pinglin (orig r6544): jesse | 2006-11-28 17:16:13 -0500
r45539 at pinglin: jesse | 2006-11-28 17:15:57 -0500
* Refactor the recording of outgoing messages so we can massage the one we send but not the one we record
Modified: rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm Fri Dec 1 14:00:23 2006
@@ -100,7 +100,12 @@
sub Commit {
my $self = shift;
- return($self->SendMessage($self->TemplateObj->MIMEObj));
+ my $ret = $self->SendMessage( $self->TemplateObj->MIMEObj );
+ if ($ret) {
+ $self->RecordOutgoingMailTransaction( $self->TemplateObj->MIMEObj )
+ if ($RT::RecordOutgoingEmail);
+ }
+ return ($ret);
}
# }}}
@@ -321,8 +326,6 @@
}
$success =~ s/\n//g;
- $self->RecordOutgoingMailTransaction($MIMEObj) if ($RT::RecordOutgoingEmail);
-
$RT::Logger->info($success);
return (1);
Modified: rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm Fri Dec 1 14:00:23 2006
@@ -2964,6 +2964,8 @@
$txns->OrderBy(FIELD => 'id', ORDER => 'DESC');
$txns->Limit(FIELD => 'ObjectId', VALUE => '1');
$txns->Limit(FIELD => 'ObjectType', VALUE => 'RT::Ticket');
+$txns->Limit(FIELD => 'Type', OPERATOR => '!=', VALUE => 'EmailRecord');
+
my $steal = $txns->First;
ok($steal->OldValue == $root->Id , "Stolen from root");
ok($steal->NewValue == $RT::SystemUser->Id , "Stolen by the systemuser");
More information about the Rt-commit
mailing list