Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.611.2.7 diff -u -r1.611.2.7 common.inc --- includes/common.inc 3 Jul 2007 20:13:23 -0000 1.611.2.7 +++ includes/common.inc 15 Jul 2007 18:49:59 -0000 @@ -1501,6 +1501,10 @@ function drupal_build_css_cache($types, $filename) { $data = ''; + $file_header = "/**\n"; + $file_header .= " * The below content is aggregated from the following files.\n"; + $file_header .= " * For licensing information please look in the original files.\n *\n"; + // Create the css/ within the files folder. $csspath = file_create_path('css'); file_check_directory($csspath, FILE_CREATE_DIRECTORY); @@ -1517,6 +1521,8 @@ $contents = preg_replace('/@import\s+(?!url)[\'"]?(\S*)\b[\'"]?/i', '@import url("\1")', $contents); // Fix all paths within this CSS file, ignoring absolute paths. $data .= preg_replace('/url\(([\'"]?)(?![a-z]+:)/i', 'url(\1'. $path . '\2', $contents); + // Add the url to the aggregated file. + $file_header .= ' * '. $GLOBALS['base_url'] .'/'. $file ."\n"; } } } @@ -1534,8 +1540,11 @@ [\n\r] # Remove line breaks. >x', '\1', $data); + // Close the comment that list the aggregated files. + $file_header .= " */\n"; + // Create the CSS file. - file_save_data($data, $csspath .'/'. $filename, FILE_EXISTS_REPLACE); + file_save_data($file_header . $data, $csspath .'/'. $filename, FILE_EXISTS_REPLACE); } return $csspath .'/'. $filename; }