Changeset 5051


Ignore:
Timestamp:
09/06/11 11:00:45 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #2261 - Corrigido os varios redirecionamentos no modulo mobile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/home.php

    r3435 r5051  
    3636        ); 
    3737        include('header.inc.php'); 
     38         
     39        //detect browser 
     40        require_once('phpgwapi/inc/class.browser.inc.php'); 
     41         
     42        $ifMobile       = false; 
     43        $browser        = new browser(); 
     44         
     45         
     46        switch( $browser->get_platform() ) 
     47        { 
     48                case browser::PLATFORM_IPHONE: 
     49                case browser::PLATFORM_IPOD: 
     50                case browser::PLATFORM_IPAD: 
     51                case browser::PLATFORM_BLACKBERRY: 
     52                case browser::PLATFORM_ANDROID:                                          
     53                        $ifMobile = false; 
     54                        break;                   
     55        } 
     56         
     57        if( $ifMobile ) 
     58        { 
     59                if( $_GET['dont_redirect_if_moble'] != 1 ) 
     60                { 
     61                        $GLOBALS['phpgw']->redirect('/mobile/index.php'); 
     62                        exit;                    
     63                } 
     64        }  
     65         
     66         
    3867        $GLOBALS['phpgw_info']['flags']['app_header']=lang('home'); 
    3968 
Note: See TracChangeset for help on using the changeset viewer.