Changeset 2419 for trunk/phpgwapi


Ignore:
Timestamp:
04/05/10 16:31:25 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Removendo a chamada redundante ao método 'phpgw_header' no ExpressoLivre?

Location:
trunk/phpgwapi/inc
Files:
3 edited

Legend:

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

    r2367 r2419  
    12241224                        } 
    12251225 
    1226                         //$GLOBALS['phpgw']->js->validate_file( 'tools','event_config' ); 
    1227                         //$GLOBALS['phpgw']->js->validate_file( 'tools','xconnector' ); 
     1226                        $GLOBALS['phpgw']->js->validate_file( 'tools','event_config' ); 
     1227                        $GLOBALS['phpgw']->js->validate_file( 'tools','xconnector' ); 
    12281228                        //$GLOBALS['phpgw']->js->validate_file( 'tools','xlink' ); 
    12291229 
  • trunk/phpgwapi/inc/class.phpgw.inc.php

    r2 r2419  
    147147                                $url = $_SERVER['PHP_SELF']; 
    148148                        } 
     149                        if ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) ) 
     150                        { 
     151                                if ( strpos( $url, '?' ) === false ) 
     152                                        $url .= '?'; 
     153                                $url .= 'BackgroundRequest=requested'; 
     154                        } 
    149155                        if($iis) 
    150156                        { 
  • trunk/phpgwapi/inc/functions.inc.php

    r2368 r2419  
    180180        /* Fill phpgw_info["server"] array */ 
    181181        // An Attempt to speed things up using cache premise 
    182         /* jakjr: ExpressoLivre does not use cache. */ 
     182 
    183183        /* 
    184         $GLOBALS['phpgw']->db->query("select config_value from phpgw_config WHERE config_app='phpgwapi' and config_name='cache_phpgw_info'",__LINE__,__FILE__); 
    185         if ($GLOBALS['phpgw']->db->num_rows()) 
    186         { 
    187                 $GLOBALS['phpgw']->db->next_record(); 
    188                 $GLOBALS['phpgw_info']['server']['cache_phpgw_info'] = stripslashes($GLOBALS['phpgw']->db->f('config_value')); 
    189         }*/ 
    190  
    191         /* jakjr: ExpressoLivre does not use cache. */ 
    192         /*       
    193         $cache_query = "select content from phpgw_app_sessions where" 
    194                 ." sessionid = '0' and loginid = '0' and app = 'phpgwapi' and location = 'config'"; 
    195  
    196         $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 
    197         $server_info_cache = $GLOBALS['phpgw']->db->num_rows(); 
    198         */ 
    199         /* 
    200         if(@$GLOBALS['phpgw_info']['server']['cache_phpgw_info'] && $server_info_cache) 
     184        $GLOBALS['phpgw']->db->query( 
     185                "select content from phpgw_app_sessions" 
     186                        . " where sessionid = '0' and loginid = '0'" 
     187                        . " and app = 'phpgwapi' and location = 'config'", 
     188                __LINE__, __FILE__ ); 
     189 
     190        if ( $GLOBALS['phpgw']->db->num_rows( ) ) 
    201191        { 
    202192                $GLOBALS['phpgw']->db->next_record(); 
     
    212202 
    213203                /* 
    214                 if(@isset($GLOBALS['phpgw_info']['server']['cache_phpgw_info'])) 
    215                 { 
    216                         if($server_info_cache) 
    217                         { 
    218                                 $cache_query = "DELETE FROM phpgw_app_sessions WHERE sessionid='0' and loginid='0' and app='phpgwapi' and location='config'"; 
    219                                 $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 
    220                         } 
    221                         $cache_query = 'INSERT INTO phpgw_app_sessions(sessionid,loginid,app,location,content) VALUES(' 
    222                                 . "'0','0','phpgwapi','config','".addslashes(serialize($GLOBALS['phpgw_info']['server']))."')"; 
    223                         $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 
    224                 }*/ 
    225         //} 
    226         unset($cache_query); 
    227         unset($server_info_cache); 
     204                $GLOBALS['phpgw']->db->query( 
     205                        'INSERT INTO phpgw_app_sessions(sessionid,loginid,app,location,content)' 
     206                                . " VALUES('0','0','phpgwapi','config','" 
     207                                . addslashes( serialize( $GLOBALS['phpgw_info']['server'] ) ) . "')", 
     208                        __LINE__, __FILE__ ); 
     209        }*/ 
     210 
    228211        if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) && !$_SERVER['HTTPS']) 
    229212        { 
     
    438421                * Load the header unless the developer turns it off                       * 
    439422                \*************************************************************************/ 
     423                if ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) || array_key_exists( 'BackgroundRequest', $_GET ) ) 
     424                { 
     425                        $GLOBALS['phpgw_info']['flags'] = array( 
     426                                'noheader'   => true, 
     427                                'nonavbar'   => true 
     428                        ); 
     429                } 
    440430                if (!@$GLOBALS['phpgw_info']['flags']['noheader']) 
    441431                { 
Note: See TracChangeset for help on using the changeset viewer.