diff --git a/includes/common.inc b/includes/common.inc index e12151f..e4959d6 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3563,17 +3563,22 @@ function drupal_load_stylesheet($file, $optimize = NULL, $reset_basepath = TRUE) if ($basepath && !file_uri_scheme($file)) { $file = $basepath . '/' . $file; } + // Store the parent base path to restore it later. + $parent_base_path = $basepath; + // Set the current base path to process prossible child imports. $basepath = dirname($file); // Load the CSS stylesheet. We suppress errors because themes may specify // stylesheets in their .info file that don't exist in the theme's path, // but are merely there to disable certain module CSS files. + $content = ''; if ($contents = @file_get_contents($file)) { // Return the processed stylesheet. - return drupal_load_stylesheet_content($contents, $_optimize); + $content = drupal_load_stylesheet_content($contents, $_optimize); } - - return ''; + // Restore the parent base path as the file and its childen are processed. + $basepath = $parent_base_path; + return $content; } /**