? theme-allow-missing-css-c.patch
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.756.2.17
diff -u -p -r1.756.2.17 common.inc
--- includes/common.inc 25 Jun 2008 10:56:11 -0000 1.756.2.17
+++ includes/common.inc 26 Jun 2008 04:05:18 -0000
@@ -1716,19 +1716,22 @@ function drupal_get_css($css = NULL) {
unset($types[$type][$file]);
continue;
}
- if (!$preprocess || !($is_writable && $preprocess_css)) {
- // If a CSS file is not to be preprocessed and it's a module CSS file, it needs to *always* appear at the *top*,
- // regardless of whether preprocessing is on or off.
- if (!$preprocess && $type == 'module') {
- $no_module_preprocess .= ''."\n";
- }
- // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*,
- // regardless of whether preprocessing is on or off.
- else if (!$preprocess && $type == 'theme') {
- $no_theme_preprocess .= ''."\n";
- }
- else {
- $output .= ''."\n";
+ // Only include the stylesheet if it exists
+ if (file_exists($file)) {
+ if (!$preprocess || !($is_writable && $preprocess_css)) {
+ // If a CSS file is not to be preprocessed and it's a module CSS file, it needs to *always* appear at the *top*,
+ // regardless of whether preprocessing is on or off.
+ if (!$preprocess && $type == 'module') {
+ $no_module_preprocess .= ''."\n";
+ }
+ // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*,
+ // regardless of whether preprocessing is on or off.
+ else if (!$preprocess && $type == 'theme') {
+ $no_theme_preprocess .= ''."\n";
+ }
+ else {
+ $output .= ''."\n";
+ }
}
}
}
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.415.2.7
diff -u -p -r1.415.2.7 theme.inc
--- includes/theme.inc 25 Jun 2008 07:56:31 -0000 1.415.2.7
+++ includes/theme.inc 26 Jun 2008 04:05:18 -0000
@@ -442,9 +442,7 @@ function list_themes($refresh = FALSE) {
foreach ($themes as $theme) {
foreach ($theme->info['stylesheets'] as $media => $stylesheets) {
foreach ($stylesheets as $stylesheet => $path) {
- if (file_exists($path)) {
- $theme->stylesheets[$media][$stylesheet] = $path;
- }
+ $theme->stylesheets[$media][$stylesheet] = $path;
}
}
foreach ($theme->info['scripts'] as $script => $path) {