Changeset 5164


Ignore:
Timestamp:
11/10/11 14:57:58 (12 years ago)
Author:
niltonneto
Message:

Ticket #2276 - Resincronizando as revisões deste ticket para o Trunk.

Location:
trunk/phpgwapi
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.vfs_shared.inc.php

    r5141 r5164  
    419419 
    420420                /*! 
     421                * @function get_size_all 
     422                * @abstract Determine size of location 
     423                * @owner_id string      uid owner 
     424                */ 
     425                 
     426                function get_size_all($owner_id) { return 0; } 
     427                 
     428                /*! 
    421429                 * @function get_size 
    422430                 * @abstract Determine size of location 
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r5141 r5164  
    25132513                } 
    25142514                 
     2515                function get_size_all($owner_id)  
     2516                {  
     2517                        $query = $GLOBALS['phpgw']->db->query ("SELECT Sum(size) FROM phpgw_vfs WHERE owner_id = '".$owner_id."'" . 
     2518                        $this->extra_sql(array ('query_text' => VFS_SQL_SELECT))); 
     2519                        $GLOBALS['phpgw']->db->next_record (); 
     2520 
     2521            $size = $GLOBALS['phpgw']->db->Record[0]; 
     2522 
     2523            return $size;  
     2524                } 
    25152525                /*return the total number of files in path*/ 
    25162526                function count_files($data){ 
  • trunk/phpgwapi/inc/functions.inc.php

    r5141 r5164  
    345345                                } 
    346346                        } 
     347 
     348                        $ifMobile = false; 
     349                        $browser = CreateObject('phpgwapi.browser'); 
     350                        switch ( $browser->get_platform() ) 
     351                        { 
     352                                case browser::PLATFORM_IPHONE: 
     353                                case browser::PLATFORM_IPOD: 
     354                                case browser::PLATFORM_IPAD: 
     355                                case browser::PLATFORM_BLACKBERRY: 
     356                                case browser::PLATFORM_NOKIA: 
     357                                case browser::PLATFORM_ANDROID: 
     358                                        $ifMobile = true; 
     359                                        break; 
     360                        } 
     361                         
     362                        if( $ifMobile ) 
     363                        { 
     364                                Header('Location: '.$GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=66'); 
     365                                exit; 
     366                        } 
     367                        else 
     368                        { 
    347369                                // this removes the sessiondata if its saved in the URL 
    348370                                $query = preg_replace('/[&]?sessionid(=|%3D)[^&]+&kp3(=|%3D)[^&]+&domain=.*$/','',$_SERVER['QUERY_STRING']); 
     
    350372                                exit; 
    351373                        } 
     374                } 
    352375 
    353376                $GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.date_time'); 
  • trunk/phpgwapi/templates/default/login_default.php

    r5141 r5164  
    6767            return $aux; 
    6868        } 
     69        $ifMobile = false; 
     70        $browser = CreateObject('phpgwapi.browser'); 
     71        switch ( $browser->get_platform() ) 
     72        { 
     73                case browser::PLATFORM_IPHONE: 
     74                case browser::PLATFORM_IPOD: 
     75                case browser::PLATFORM_IPAD: 
     76                case browser::PLATFORM_BLACKBERRY: 
     77                case browser::PLATFORM_NOKIA: 
     78                case browser::PLATFORM_ANDROID: 
     79                        $ifMobile = true; 
     80                        break; 
     81        } 
     82         
     83        if( $ifMobile && $_GET['dont_redirect_if_moble'] != 1 )  
     84        { 
     85                $GLOBALS['phpgw']->redirect_link('/mobile/login.php'); 
     86        } 
     87        else 
     88        { 
    6989        /* Program starts here */ 
    7090         
     
    585605 
    586606        $tmpl->pfp('loginout','login_form'); 
     607        } 
    587608 
    588609?> 
Note: See TracChangeset for help on using the changeset viewer.