Changeset 2646 for trunk/phpgwapi


Ignore:
Timestamp:
04/28/10 11:35:47 (14 years ago)
Author:
amuller
Message:

Ticket #1044 - Arruma caminhos relativos e absolutos

Location:
trunk/phpgwapi/inc
Files:
2 edited

Legend:

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

    r2645 r2646  
    13271327                        if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) ) 
    13281328                        {                
    1329                                 $path = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ?  
    1330                                         $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/';  
    1331  
    1332                                 if ( strpos( $path, '/' ) != ( strlen( $path ) - 1 ) )  
    1333                                         $path .= '/';  
    1334  
    1335                                 $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 
    1336  
    1337                                 $GLOBALS['phpgw']->css->validate_file( $path."phpgwapi/templates/".$template."/css/base.css"); 
    1338                                 $GLOBALS['phpgw']->css->validate_file( $path."phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
    1339                                 $GLOBALS['phpgw']->css->validate_file( $path.$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
    1340                                 $GLOBALS['phpgw']->css->validate_file( $path.$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css"); 
     1329                                $GLOBALS['phpgw']->css->validate_file( "phpgwapi/templates/".$template."/css/base.css"); 
     1330                                $GLOBALS['phpgw']->css->validate_file( "phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
     1331                                $GLOBALS['phpgw']->css->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
     1332                                $GLOBALS['phpgw']->css->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css"); 
    13411333                                 
    13421334                                $tpl -> set_var( 'css_file',  $GLOBALS['phpgw']->css->get_css() ); 
  • trunk/phpgwapi/inc/class.css.inc.php

    r2645 r2646  
    5757                function validate_file($file, $stack = false ) 
    5858                { 
    59                         if (file_exists(PHPGW_SERVER_ROOT . SEP . $file)) 
     59                        $path = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ? 
     60                                $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/'; 
     61 
     62                        if ( strpos( $path, '/' ) != ( strlen( $path ) - 1 ) ) 
     63                                $path .= '/'; 
     64 
     65                        $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 
     66 
     67                        if (file_exists(PHPGW_SERVER_ROOT . SEP . $path . $file)) 
    6068                                $this->files[] = $file; 
    6169                } 
Note: See TracChangeset for help on using the changeset viewer.