Ignore:
Timestamp:
07/14/11 15:18:41 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #2124 - Continua armazenando a senha e o nome do usuário e deixa o botão sair

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/mobile/login.php

    r4695 r4744  
    1717        $GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 
    1818         
    19         if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1) 
    20                 start_prefered_app(); 
     19        if( isset($GLOBALS['sessionid']) ) 
     20        { 
     21                if( $_GET['cd'] != 10 && $_GET['cd'] != 1 && $_GET['cd'] !== 'logout_mobile' ) 
     22                { 
     23                        start_prefered_app(); 
     24                } 
     25        } 
    2126                 
    2227        if ( $GLOBALS['phpgw_info']['server']['use_https'] > 0 ) 
     
    8388        function check_logoutcode($code) { 
    8489                switch($code) { 
     90                        case 'logout_mobile':  
    8591                        case 1: 
    8692                                logout(); 
     
    109115                                } 
    110116                                return lang('Your session could not be verified.'); 
     117                         
    111118                        default: 
    112119                                return ''; 
     
    123130        elseif(get_var('lem',array('GET','COOKIE')) && get_var('pem',array('GET','COOKIE'))) 
    124131        { 
    125                 if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10') {  
    126                         $submit = True; 
    127                         $login  = base64_decode(get_var('lem',array('GET','COOKIE'))); 
    128                         $passwd = base64_decode(get_var('pem',array('GET','COOKIE'))); 
    129                         $passwd_type = 'text'; 
    130                 } 
    131                 else { 
    132                         $GLOBALS['phpgw']->session->phpgw_setcookie('lem'); 
    133                         $GLOBALS['phpgw']->session->phpgw_setcookie('pem'); 
     132                if( $_GET['cd'] !== 'logout_mobile' ) 
     133                { 
     134                        if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10') 
     135                        {  
     136                                $submit = True; 
     137                                $login  = base64_decode(get_var('lem',array('GET','COOKIE'))); 
     138                                $passwd = base64_decode(get_var('pem',array('GET','COOKIE'))); 
     139                                $passwd_type = 'text'; 
     140                        } 
     141                        else 
     142                        { 
     143                                $GLOBALS['phpgw']->session->phpgw_setcookie('lem'); 
     144                                $GLOBALS['phpgw']->session->phpgw_setcookie('pem'); 
     145                        } 
    134146                } 
    135147        } 
Note: See TracChangeset for help on using the changeset viewer.