Changeset 3052 for branches/2.2/phpgwapi/inc/class.common.inc.php
- Timestamp:
- 07/14/10 17:19:29 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/phpgwapi/inc/class.common.inc.php
r3018 r3052 1267 1267 if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) ) 1268 1268 { 1269 $css = "/%s/templates/%s/%s.css"; 1270 1271 global $path, $link, $template; 1272 1273 $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css ); 1274 1275 $link = '<LINK href="%s" type="text/css" rel="StyleSheet">'; 1276 $link = sprintf( $link, 1277 "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}" 1278 ); 1279 1280 $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 1281 1282 function _css( $module, $css ) 1283 { 1284 global $link, $path, $template; 1285 1286 if ( file_exists( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) ) ) 1287 return sprintf( $link, $module, $template, $css ); 1288 1289 if ( file_exists( sprintf( $path, $module, 'default', str_replace( '/', SEP, $css ) ) ) ) 1290 return sprintf( $link, $module, 'default', $css ); 1291 1292 return ''; 1293 } 1294 1295 $css = _css( 'phpgwapi', 'css/base' ); 1296 $css .= _css( 'phpgwapi', "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1297 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 1298 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], 'app' ); 1299 1300 if ( $css ) 1301 $tpl -> set_var( 'css_file', $css ); 1269 $template = $GLOBALS['phpgw_info']['server']['template_set']; 1270 $GLOBALS['phpgw']->css->validate_file( "phpgwapi/templates/".$template."/css/base.css"); 1271 $GLOBALS['phpgw']->css->validate_file( "phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 1272 $GLOBALS['phpgw']->css->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 1273 $GLOBALS['phpgw']->css->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css"); 1274 1275 $tpl -> set_var( 'css_file', $GLOBALS['phpgw']->css->get_css() ); 1276 1302 1277 } 1303 1278
Note: See TracChangeset
for help on using the changeset viewer.