Ignore:
Timestamp:
06/08/10 10:11:06 (14 years ago)
Author:
rodsouza
Message:

Ticket #1058 - Corrigindo problemas na inclusão de folhas de estilo.

File:
1 edited

Legend:

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

    r2664 r2903  
    4141                function get_css() 
    4242                { 
    43                         $path = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ?   
    44                                 $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/';   
     43                        $path = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ? 
     44                                $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/'; 
    4545 
    46                         if ( strpos( $path, '/' ) != ( strlen( $path ) - 1 ) )   
    47                                 $path .= '/';   
    48                         if ($GLOBALS['phpgw_info']['server']['csspacker'] == "True") 
    49                                   foreach($this->files as $cssFile) 
    50                                   { 
    51                                           if (!file_exists(PHPGW_SERVER_ROOT.SEP.$cssFile."pack.css")) 
    52                                                 $this->create_pack($cssFile); 
    53                                           $out .= "\n\t\t<link href='".$path.$cssFile."pack.css' type='text/css' rel='StyleSheet'>"; 
    54                                            
    55                                   } 
    56                           else 
    57                                   foreach($this->files as $cssFile) 
    58                                   { 
    59                                           $_SESSION['debug'][] = "/".$cssFile; 
    60                                           $out .= "\n\t\t<link href='".$path.$cssFile."' type='text/css' rel='StyleSheet'>"; 
    61                                   } 
    62                           return $out; 
     46                        if ( strpos( $path, '/' ) != ( strlen( $path ) - 1 ) ) 
     47                                $path .= '/'; 
     48 
     49                        foreach ( $this -> files as $cssFile ) 
     50                        { 
     51                                if ( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'csspacker' ] == "True" ) 
     52                                { 
     53                                        if ( ! file_exists( PHPGW_SERVER_ROOT . SEP . $cssFile . 'pack.css' ) ) 
     54                                                $this -> create_pack( $cssFile ); 
     55 
     56                                        $cssFile .= 'pack.css'; 
     57                                } 
     58 
     59                                $out .= '<link type="text/css" rel="StyleSheet" href="' . $path . $cssFile . '" />'; 
     60                        } 
     61 
     62                        return $out; 
    6363                } 
    6464 
Note: See TracChangeset for help on using the changeset viewer.