Show
Ignore:
Timestamp:
04/28/05 15:58:29 (8 years ago)
Author:
fproulx
Message:

2005-04-28 Fran�ois Proulx <francois.proulx@…>

  • Logout button build a query string containing gw_id, gw_address, gw_port ( if available ), so that a user at a physical hotspot will get the login page from the hotspot he is.
  • Fixed but in Locale ( did not propertly set the locale in the session )
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/MainUI.php

    r593 r594  
    139139        private function getToolContent($section = 'START') 
    140140        { 
     141        global $session; 
    141142                $html = ''; 
    142143                if ($section = 'START') 
     
    150151                                $html .= '<p>'._("Logged in as:").' '.$user->getUsername().'</p>'."\n"; 
    151152                                $html .= '<a class="administration" HREF="'.BASE_SSL_PATH.'?content=myprofile"><img class="administration" src="/images/profile.gif" border="0"> My profile</a>'."\n"; 
    152                                 $html .= '<a class="administration" HREF="'.BASE_SSL_PATH.'login/?logout=true"><img class="administration" src="/images/logout.gif" border="0"> Logout</a>'."\n"; 
     153                 
     154                $gw_id = $session->get(SESS_GW_ID_VAR); 
     155                $gw_address = $session->get(SESS_GW_ADDRESS_VAR); 
     156                $gw_port = $session->get(SESS_GW_PORT_VAR); 
     157                 
     158                if($gw_id && $gw_address && $gw_port) 
     159                    $html .= '<a class="administration" HREF="'.BASE_SSL_PATH.'login/?logout=true&gw_id='.$gw_id.'&gw_address='.$gw_address.'&gw_port='.$gw_port.'"><img class="administration" src="/images/logout.gif" border="0"> Logout</a>'."\n"; 
     160                else 
     161                                    $html .= '<a class="administration" HREF="'.BASE_SSL_PATH.'login/?logout=true"><img class="administration" src="/images/logout.gif" border="0"> Logout</a>'."\n"; 
    153162 
    154163                        }