? .DS_Store
? includes/.DS_Store
? includes/database/.DS_Store
? modules/search/.new.MKbmKA
? sites/all/.DS_Store
? sites/all/modules/.DS_Store
? sites/all/modules/content_browser
? sites/all/modules/devel
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1077
diff -u -p -r1.1077 common.inc
--- includes/common.inc 4 Jan 2010 23:08:34 -0000 1.1077
+++ includes/common.inc 5 Jan 2010 17:08:22 -0000
@@ -3277,7 +3277,6 @@ function drupal_get_css($css = NULL) {
$previous_item[$basename] = $key;
}
}
-
// If CSS preprocessing is off, we still need to output the styles.
// Additionally, go through any remaining styles if CSS preprocessing is on
// and output the non-cached ones.
@@ -3290,7 +3289,9 @@ function drupal_get_css($css = NULL) {
);
$rendered_css = array();
$inline_css = '';
- $external_css = '';
+ $overflow_css = '';
+ $external_css = array();
+ $preprocessed_css = array();
$preprocess_items = array();
foreach ($css as $data => $item) {
// Loop through each of the stylesheets, including them appropriately based
@@ -3302,7 +3303,7 @@ function drupal_get_css($css = NULL) {
$element = $css_element;
$element['#attributes']['media'] = $item['media'];
$element['#attributes']['href'] = file_create_url($item['data']) . $query_string;
- $rendered_css[] = theme('html_tag', array('element' => $element));
+ $rendered_css[] = $element;
}
else {
$preprocess_items[$item['media']][] = $item;
@@ -3320,7 +3321,7 @@ function drupal_get_css($css = NULL) {
$element = $css_element;
$element['#attributes']['media'] = $item['media'];
$element['#attributes']['href'] = $item['data'];
- $external_css .= theme('html_tag', array('element' => $element));
+ $external_css[] = $element;
break;
}
}
@@ -3333,9 +3334,44 @@ function drupal_get_css($css = NULL) {
$element['#attributes']['media'] = $media;
$filename = 'css_' . md5(serialize($items) . $query_string) . '.css';
$element['#attributes']['href'] = file_create_url(drupal_build_css_cache($items, $filename));
- $rendered_css['preprocess'] .= theme('html_tag', array('element' => $element));
+ $preprocessed_css[] = $element;
}
+ // Find the offset of the ['preprocess'] element.
+ $offsetByKey = array_flip(array_keys($rendered_css));
+ $offset = $offsetByKey['preprocess'];
+ // Insert $preprocessed_css.
+ $rendered_css = array_splice($rendered_css, $offset, 1, $preprocessed_css);
+ }
+
+ // IE ignores >30 tags, so split the array.
+ $overflow_horizon = 30;
+ $stylesheet_elements = array_merge($rendered_css,$external_css);
+ $overflow_elements = variable_get('workaround_ie_limit', 1) ? array_splice($stylesheet_elements,$overflow_horizon) : array();
+
+ $stylesheets = '';
+ foreach ($stylesheet_elements as $element){
+ $stylesheets .= theme('html_tag', array('element' => $element)) . "\n";
+ }
+
+ $stylesheets_overflow = '';
+ foreach ($overflow_elements as $element){
+ $path = $element['#attributes']['href'];
+ $media = $element['#attributes']['media'];
+ $stylesheets_overflow .= theme('css_import', array('path' => $path, 'media' => $media));
+ }
+
+ if (!empty($stylesheets_overflow)) {
+ // Build a