[Rt-commit] r7361 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Mar 27 06:25:07 EDT 2007
Author: ruz
Date: Tue Mar 27 06:25:05 2007
New Revision: 7361
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
Log:
r4810 at cubic-pc: cubic | 2007-03-27 14:20:58 +0400
* arg can be not only ref but a scalar too
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm Tue Mar 27 06:25:05 2007
@@ -387,7 +387,9 @@
require RT::Action::SendEmail;
RT::Action::SendEmail->AttachTickets(
RT::Action::SendEmail->AttachTickets,
- @{ $ARGS{'AttachTickets'} }
+ ref $ARGS{'AttachTickets'}?
+ @{ $ARGS{'AttachTickets'} }
+ :( $ARGS{'AttachTickets'} )
);
}
@@ -533,7 +535,7 @@
# skip updates if the content contains only user's signature
# and we don't update other fields
- if( $args{'SkipSignatureOnly'} ) {
+ if ( $args{'SkipSignatureOnly'} ) {
my $sig = $args{'TicketObj'}->CurrentUser->UserObj->Signature || '';
$sig =~ s/^\s*|\s*$//g;
if( $args{ARGSRef}->{'UpdateContent'} =~ /^\s*(--)?\s*\Q$sig\E\s*$/ ) {
@@ -591,6 +593,16 @@
foreach values %{ $args{ARGSRef}->{'UpdateAttachments'} };
}
+ if ( $args{ARGSRef}->{'AttachTickets'} ) {
+ require RT::Action::SendEmail;
+ RT::Action::SendEmail->AttachTickets(
+ RT::Action::SendEmail->AttachTickets,
+ ref $args{ARGSRef}->{'AttachTickets'}?
+ @{ $args{ARGSRef}->{'AttachTickets'} }
+ :( $args{ARGSRef}->{'AttachTickets'} )
+ );
+ }
+
## TODO: Implement public comments
if ( $args{ARGSRef}->{'UpdateType'} =~ /^(private|public)$/ ) {
my ( $Transaction, $Description, $Object ) = $args{TicketObj}->Comment(
More information about the Rt-commit
mailing list