Changeset 2273 for trunk/phpgwapi/inc/class.common.inc.php
- Timestamp:
- 03/16/10 18:27:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.common.inc.php
r2269 r2273 1255 1255 * @author Dave Hall (*based* on verdilak? css inclusion code) 1256 1256 */ 1257 function get_css( )1257 function get_css( ) 1258 1258 { 1259 1259 $tpl = createObject('phpgwapi.Template', $this->get_tpl_dir('phpgwapi')); … … 1279 1279 if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) ) 1280 1280 { 1281 $css = "/ {$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/%s/%s.css";1281 $css = "/%s/templates/%s/%s.css"; 1282 1282 1283 1283 global $path, $link, $template; … … 1292 1292 $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 1293 1293 1294 function _css( $ css )1294 function _css( $module, $css ) 1295 1295 { 1296 1296 global $link, $path, $template; 1297 if ( file_exists( sprintf( $path, $template, str_replace( '/', SEP, $css ) ) ) ) 1298 return sprintf( $link, $template, $css ); 1299 1300 if ( file_exists( sprintf( $path, 'default', str_replace( '/', SEP, $css ) ) ) ) 1301 return sprintf( $link, 'default', $css ); 1297 1298 error_log( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) . "\n", 3, '/tmp/log' ); 1299 1300 if ( file_exists( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) ) ) 1301 return sprintf( $link, $module, $template, $css ); 1302 1303 if ( file_exists( sprintf( $path, $module, 'default', str_replace( '/', SEP, $css ) ) ) ) 1304 return sprintf( $link, $module, 'default', $css ); 1302 1305 1303 1306 return ''; 1304 1307 } 1305 1308 1306 $css = _css( 'app' ); 1307 $css .= _css( "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1309 $css = _css( 'phpgwapi', "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1310 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], 'app' ); 1311 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1308 1312 1309 1313 if ( $css )
Note: See TracChangeset
for help on using the changeset viewer.