[Rt-commit] r9020 - in rt/branches/3.7-EXPERIMENTAL: .
html/Ticket/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Wed Sep 12 14:52:09 EDT 2007
Author: sartak
Date: Wed Sep 12 14:52:08 2007
New Revision: 9020
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/PreviewScrips
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html
Log:
r42602 at onn: sartak | 2007-09-12 14:51:55 -0400
Have SquelchRecipients return a hash instead of an array with a special value in index 0
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/PreviewScrips
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/PreviewScrips (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/PreviewScrips Wed Sep 12 14:52:08 2007
@@ -50,7 +50,10 @@
</%args>
<%init>
-my ($Object, @non_recipients) = $m->comp('SELF:SquelchRecipients', %ARGS);
+my %squelch = $m->comp('SELF:SquelchRecipients', %ARGS);
+my $Object = $squelch{'Object'};
+my @non_recipients = @{ $squelch{'EmailAddresses'} };
+
</%init>
<h2><&|/l&>This message will be sent to...</&></h2>
@@ -137,7 +140,7 @@
}
-return ($Object, $TicketObj->SquelchMailTo);
+return (Object => $Object, EmailAddresses => [$TicketObj->SquelchMailTo]);
</%INIT>
</%METHOD>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Update.html Wed Sep 12 14:52:08 2007
@@ -273,12 +273,11 @@
if ( $ARGS{'SubmitTicket'} && $ARGS{'Encrypt'} ) {
# skip any email addresses that we won't be sending mail to
- my @non_recipients = $m->comp(
- '/Ticket/Elements/PreviewScrips:SquelchRecipients',
- %ARGS, TicketObj => $TicketObj
- );
- shift @non_recipients;
- my %seen = map { lc($_) => 1 } @non_recipients;
+ my %squelch = $m->comp(
+ '/Ticket/Elements/PreviewScrips:SquelchRecipients',
+ %ARGS, TicketObj => $TicketObj
+ );
+ my %seen = map { lc($_) => 1 } @{ $squelch{'EmailAddresses'} };
my @recipients = grep {!$seen{lc $_}} $m->comp(
'/Ticket/Elements/PreviewScrips:GetRecipients',
More information about the Rt-commit
mailing list