[Rt-commit] rt branch, 4.0/no-ticket-interface-for-approvals, updated. rt-4.0.4-121-g74643ad

Thomas Sibley trs at bestpractical.com
Thu Jan 12 11:42:56 EST 2012


The branch, 4.0/no-ticket-interface-for-approvals has been updated
       via  74643adeb101b5382db89d23b0962ece9cbf9bcf (commit)
      from  e26f6a333bf75c0bd5d6ffc9df928bf1c6bb8d89 (commit)

Summary of changes:
 lib/RT/Interface/Web.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 74643adeb101b5382db89d23b0962ece9cbf9bcf
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Jan 12 11:39:26 2012 -0500

    Potentially short-circuit on a less expensive check than ForceApprovalsView
    
    Avoids the two config method calls in the rare case that we don't have a
    ticket id.
    
    Suggested by Ruslan during review.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 0e4f94d..c06fffe 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1260,8 +1260,8 @@ sub MaybeRedirectToApproval {
 
     my $id = $args{ARGSRef}->{id};
 
-    if (    RT->Config->Get('ForceApprovalsView')
-        and $id
+    if (    $id
+        and RT->Config->Get('ForceApprovalsView')
         and not $args{Path} =~ /$args{Whitelist}/)
     {
         my $ticket = RT::Ticket->new( $session{'CurrentUser'} );

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


More information about the Rt-commit mailing list