X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FApprovals%2Findex.html;h=dbdc11ec5fe35a85dc91d8868d1ee811f730d5d7;hb=ed1f84b4e8f626245995ecda5afcf83092c153b2;hp=c72e9afe2b78717ce14eceb39d2e6206a8c26f80;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/share/html/Approvals/index.html b/rt/share/html/Approvals/index.html index c72e9afe2..dbdc11ec5 100755 --- a/rt/share/html/Approvals/index.html +++ b/rt/share/html/Approvals/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -64,13 +64,17 @@ foreach my $arg ( keys %ARGS ) { my $ticket = LoadTicket($1); - if ( $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ) { - my $notes = MIME::Entity->build( - Data => [ $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ] - ); - RT::I18N::SetMIMEEntityToUTF8($notes); # convert text parts into utf-8 + my $skip_update = 0; + $m->callback( CallbackName => 'BeforeApproval', + skip_update => \$skip_update, + Ticket => $ticket, + actions => \@actions); + next if $skip_update; - my ( $notesval, $notesmsg ) = $ticket->Correspond( MIMEObj => $notes ); + if ( $ARGS{ "Approval-" . $ticket->Id . "-Notes" } ) { + my ( $notesval, $notesmsg ) = $ticket->Correspond( + Content => $ARGS{ "Approval-" . $ticket->Id . "-Notes" } + ); if ($notesval) { push ( @actions, loc("Approval #[_1]: Notes recorded",$ticket->Id )); } else {