From e70abd21bab68b23488f7ef1ee2e693a3b365691 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 18 May 2010 18:49:59 +0000 Subject: import rt 3.8.8 --- rt/share/html/Ticket/Create.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'rt/share/html/Ticket/Create.html') diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index 28b655691..2c8e35778 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -112,6 +112,7 @@ +% $m->callback( %ARGS, CallbackName => 'AfterSubject' ); @@ -158,6 +159,7 @@ % } else { <& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &> %} +% $m->callback( %ARGS, QueueObj => $QueueObj, CallbackName => 'AfterMessageBox' );
@@ -392,6 +394,22 @@ if ( !exists $ARGS{'AddMoreAttach'} && ($ARGS{'id'}||'') eq 'new' ) { $checks_failure = 1 unless $status; } +# check email addresses for RT's +{ + foreach my $field ( qw(Requestors Cc AdminCc) ) { + my $value = $ARGS{ $field }; + next unless defined $value && length $value; + + my @emails = Email::Address->parse( $value ); + foreach my $email ( grep RT::EmailParser->IsRTAddress($_->address), @emails ) { + push @results, loc("[_1] is an address RT receives mail at. Adding it as a '[_2]' would create a mail loop", $email->format, loc($field =~ /^(.*?)s?$/) ); + $checks_failure = 1; + $email = undef; + } + $ARGS{ $field } = join ', ', map $_->format, grep defined, @emails; + } +} + my $skip_create = 0; $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => \$skip_create, checks_failure => $checks_failure, results => \@results ); -- cgit v1.2.1