Changeset 2644


Ignore:
Timestamp:
04/27/10 18:28:15 (14 years ago)
Author:
rodsouza
Message:

Ticket #1044 - Corrigindo problema com caminho.

Location:
trunk/phpgwapi/inc
Files:
2 edited

Legend:

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

    r2640 r2644  
    13301330                                $cssObj = new css(); 
    13311331 
    1332                                 $path = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]; 
    13331332                                $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 
    13341333 
    1335                                 $cssObj->validate_file($path."phpgwapi/templates/".$template."/css/base.css"); 
    1336                                 $cssObj->validate_file($path."phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
    1337                                 $cssObj->validate_file($path.$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
    1338                                 $cssObj->validate_file($path.$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css"); 
     1334                                $cssObj->validate_file( "phpgwapi/templates/".$template."/css/base.css"); 
     1335                                $cssObj->validate_file( "phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
     1336                                $cssObj->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
     1337                                $cssObj->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css"); 
    13391338                                 
    13401339                                $tpl -> set_var( 'css_file',  $cssObj->get_css() ); 
  • trunk/phpgwapi/inc/class.css.inc.php

    r2643 r2644  
    4141                function get_css() 
    4242                { 
     43                        $path = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ? 
     44                                $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/'; 
     45 
     46                        if ( strpos( $path, '/' ) != ( strlen( $path ) - 1 ) ) 
     47                                $path .= '/'; 
     48 
    4349                        if ($GLOBALS['phpgw_info']['server']['csspacker'] == "True") 
    4450                                  foreach($this->files as $cssFile) 
     
    4652                                          if (!file_exists(PHPGW_SERVER_ROOT.SEP.$cssFile."pack.css")) 
    4753                                                $this->create_pack($cssFile); 
    48                                           $out .= "\n\t\t<link href='".$cssFile."pack.css' type='text/css' rel='StyleSheet'>"; 
     54                                          $out .= "\n\t\t<link href='".$path.$cssFile."pack.css' type='text/css' rel='StyleSheet'>"; 
    4955                                           
    5056                                  } 
    5157                          else 
    5258                                  foreach($this->files as $cssFile) 
    53                                           $out .= "\n\t\t<link href='".$cssFile."' type='text/css' rel='StyleSheet'>"; 
     59                                          $out .= "\n\t\t<link href='".$path.$cssFile."' type='text/css' rel='StyleSheet'>"; 
    5460                          return $out; 
    5561                } 
     
    5763                function validate_file($file, $stack = false ) 
    5864                { 
    59                         if (file_exists(PHPGW_SERVER_ROOT ."/". $file)) 
     65                        if (file_exists(PHPGW_SERVER_ROOT . '/' . $file)) 
    6066                                $this->files[] = $file; 
    6167                } 
Note: See TracChangeset for help on using the changeset viewer.