[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.5-227-gccfe6fc

Kevin Falcone falcone at bestpractical.com
Fri Oct 2 17:45:09 EDT 2009


The branch, 3.8-trunk has been updated
       via  ccfe6fca61caed90f9e59b54efec3d349d680bf6 (commit)
      from  279c65a65847c4e40561196afc2e2868f336ad48 (commit)

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

- Log -----------------------------------------------------------------
commit ccfe6fca61caed90f9e59b54efec3d349d680bf6
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Oct 2 17:44:48 2009 -0400

    Fix loc() calls so errors are less explodey

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 757de8e..d6624ce 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -380,7 +380,7 @@ sub AttemptExternalAuth {
 
                 # we failed to successfully create the user. abort abort abort.
                 delete $HTML::Mason::Commands::session{'CurrentUser'};
-                $m->comp( '/Elements/Login', %$ARGS, Error => loc( 'Cannot create user: [_1]', $msg ) )
+                $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc( 'Cannot create user: [_1]', $msg ) )
                     if RT->Config->Get('WebFallbackToInternalAuth');;
                 $m->abort();
             }
@@ -393,14 +393,14 @@ sub AttemptExternalAuth {
             $user = $orig_user;
 
             if ( RT->Config->Get('WebExternalOnly') ) {
-                $m->comp( '/Elements/Login', %$ARGS, Error => loc('You are not an authorized user') );
+                $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc('You are not an authorized user') );
                 $m->abort();
             }
         }
     } elsif ( RT->Config->Get('WebFallbackToInternalAuth') ) {
         unless ( defined $HTML::Mason::Commands::session{'CurrentUser'} ) {
             # XXX unreachable due to prior defaulting in HandleRequest (check c34d108)
-            $m->comp( '/Elements/Login', %$ARGS, Error => loc('You are not an authorized user') );
+            $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc('You are not an authorized user') );
             $m->abort();
         }
     } else {
@@ -422,7 +422,7 @@ sub AttemptPasswordAuthentication {
 
     unless ( $user_obj->id && $user_obj->IsPassword( $ARGS->{pass} ) ) {
         $RT::Logger->error("FAILED LOGIN for @{[$ARGS->{user}]} from $ENV{'REMOTE_ADDR'}");
-        $m->comp( '/Elements/Login', %$ARGS, Error => loc('Your username or password is incorrect'), );
+        $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc('Your username or password is incorrect'), );
         $m->callback( %$ARGS, CallbackName => 'FailedLogin', CallbackPage => '/autohandler' );
         $m->abort;
     }

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


More information about the Rt-commit mailing list