[Bps-public-commit] rt-extension-ajaxpreviewscrips branch, master, updated. 9180535e745e818f6c164da0b43712925f58e9ab

? sunnavy sunnavy at bestpractical.com
Sat Jul 12 05:31:32 EDT 2014


The branch, master has been updated
       via  9180535e745e818f6c164da0b43712925f58e9ab (commit)
      from  338fd07ea0d99ac59afa4b85bc46529f9e9c97ec (commit)

Summary of changes:
 html/Helpers/PreviewScrips            | 10 +++++-----
 html/Helpers/ShowSimplifiedRecipients | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

- Log -----------------------------------------------------------------
commit 9180535e745e818f6c164da0b43712925f58e9ab
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jul 12 17:31:12 2014 +0800

    "return" still emits the footer, incorrectly. thanks to chmrr++

diff --git a/html/Helpers/PreviewScrips b/html/Helpers/PreviewScrips
index 3ef3fce..8cceb89 100644
--- a/html/Helpers/PreviewScrips
+++ b/html/Helpers/PreviewScrips
@@ -48,21 +48,21 @@
 <%init>
 my $TicketObj = RT::Ticket->new($session{CurrentUser});
 $TicketObj->Load($ARGS{id});
-return unless $TicketObj->id && $ARGS{UpdateType};
+$m->abort unless $TicketObj->id && $ARGS{UpdateType};
 
-return unless $TicketObj->CurrentUserHasRight('ShowOutgoingEmail');
+$m->abort unless $TicketObj->CurrentUserHasRight('ShowOutgoingEmail');
 if ( $ARGS{UpdateType} eq 'private' ) {
-    return
+    $m->abort
       unless $TicketObj->CurrentUserHasRight( 'CommentOnTicket' ) || $TicketObj->CurrentUserHasRight( 'ModifyTicket' );
 }
 else {
-    return
+    $m->abort
       unless $TicketObj->CurrentUserHasRight( 'ReplyToTicket' ) || $TicketObj->CurrentUserHasRight( 'ModifyTicket' );
 }
 
 my $Object = $TicketObj->DryRun(%ARGS);
 my %recips;
-return unless $Object;
+$m->abort unless $Object;
 
 my %squelched = ProcessTransactionSquelching( \%ARGS );
 </%init>
diff --git a/html/Helpers/ShowSimplifiedRecipients b/html/Helpers/ShowSimplifiedRecipients
index d336754..ab45134 100644
--- a/html/Helpers/ShowSimplifiedRecipients
+++ b/html/Helpers/ShowSimplifiedRecipients
@@ -46,23 +46,23 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%init>
-return unless RT->Config->Get('SimplifiedRecipients', $session{'CurrentUser'});
+$m->abort unless RT->Config->Get('SimplifiedRecipients', $session{'CurrentUser'});
 
 my $TicketObj = RT::Ticket->new($session{CurrentUser});
 $TicketObj->Load($ARGS{id});
-return unless $TicketObj->id && $ARGS{UpdateType};
+$m->abort unless $TicketObj->id && $ARGS{UpdateType};
 
 if ( $ARGS{UpdateType} eq 'private' ) {
-    return
+    $m->abort
       unless $TicketObj->CurrentUserHasRight( 'CommentOnTicket' ) || $TicketObj->CurrentUserHasRight( 'ModifyTicket' );
 }
 else {
-    return
+    $m->abort
       unless $TicketObj->CurrentUserHasRight( 'ReplyToTicket' ) || $TicketObj->CurrentUserHasRight( 'ModifyTicket' );
 }
 
 my $Object = $TicketObj->DryRun(%ARGS);
-return unless $Object;
+$m->abort unless $Object;
 
 my %headers = (To => {}, Cc => {}, Bcc => {});
 my %no_squelch;

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list