Ignore:
Timestamp:
04/25/11 16:04:39 (13 years ago)
Author:
niltonneto
Message:

Ticket #1787 - Correção para evitar os vários redirecionamentos para o login automatico

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mobile/login.php

    r4129 r4131  
    1313        ); 
    1414         
    15         include('../header.inc.php'); 
    16         include('./mobile_header.inc.php'); 
     15        include_once('../header.inc.php'); 
     16        include_once('./mobile_header.inc.php'); 
    1717        $GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid']; 
    1818         
     
    2020                start_prefered_app(); 
    2121                 
    22         if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)  { 
    23                 if ($_SERVER['HTTPS'] != 'on') { 
    24                         $proxies=explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']); 
     22        if ( $GLOBALS['phpgw_info']['server']['use_https'] > 0 ) 
     23        { 
     24                if ($_SERVER['HTTPS'] != 'on') 
     25                { 
     26                        $proxies = explode(',',$_SERVER['HTTP_X_FORWARDED_HOST']); 
    2527            $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST']; 
    2628                        Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']); 
     
    4850        $browser = CreateObject('mobile.browser'); 
    4951         
    50         switch ($browser->get_platform()) { 
     52        switch ($browser->get_platform()) 
     53        { 
    5154                case browser::PLATFORM_IPHONE: 
    5255                case browser::PLATFORM_IPOD: 
     
    116119                } 
    117120        } 
    118          
    119         else { 
     121        else  
     122        { 
    120123                $passwd = $_POST['passwd']; 
    121124                $passwd_type = $_POST['passwd_type']; 
    122125        } 
    123126 
    124         if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) 
     127        if( isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit ) 
    125128        { 
    126129                if( !get_var('pem',array('GET','COOKIE')) && getenv('REQUEST_METHOD') != 'POST'  
     
    165168                } 
    166169        } 
    167         elseif ($_GET['lang'])  { 
     170        elseif ($_GET['lang']) 
     171        { 
    168172                $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang']; 
    169173        } 
    170         elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id) { 
     174        elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id) 
     175        { 
    171176                list($lang) = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); 
    172177                $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang; 
Note: See TracChangeset for help on using the changeset viewer.