[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4172] branches/1.3/scripts/login.pl



Revision: 4172
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4172&view=rev
Author:   tshvr
Date:     2011-12-08 22:01:26 +0000 (Thu, 08 Dec 2011)
Log Message:
-----------
use locale from request,successive logouts

Modified Paths:
--------------
    branches/1.3/scripts/login.pl

Modified: branches/1.3/scripts/login.pl
===================================================================
--- branches/1.3/scripts/login.pl	2011-12-08 21:58:38 UTC (rev 4171)
+++ branches/1.3/scripts/login.pl	2011-12-08 22:01:26 UTC (rev 4172)
@@ -34,16 +34,17 @@
 
 sub __default {
    my ($request) = @_;
-    my $locale;
-    $locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language})
-      or $request->error( __FILE__ . ':' . __LINE__ . 
-         ": Locale not loaded: $!\n" );         
+    #HV _locale from request
+    #my $locale;
+    #$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language})
+    #  or $request->error( __FILE__ . ':' . __LINE__ . 
+    #     ": Locale not loaded: $!\n" );         
 
     $request->{stylesheet} = "ledgersmb.css";
     $request->{titlebar} = "LedgerSMB $request->{VERSION}";
      my $template = LedgerSMB::Template->new(
         user =>$request->{_user}, 
-        locale => $locale,
+        locale => $request->{_locale},
         path => 'UI',
         template => 'login',
         format => 'HTML'
@@ -128,7 +129,7 @@
 =cut
 
 sub logout {
-    my ($request) = @_;
+    my ($request) = @_;    
     @{$request->{scripts}} = 
                   qw(UI/logout/iexplore.js 
                      UI/logout/firefox.js
@@ -139,7 +140,7 @@
                    );
     $request->{callback}   = "";
     $request->{endsession} = 1;
-    LedgerSMB::Auth::session_destroy($request);
+    if($request->{dbh}){LedgerSMB::Auth::session_destroy($request);}#if logout on already logged out session
      my $template = LedgerSMB::Template->new(
         user =>$request->{_user}, 
         locale => $request->{_locale},

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.