? drupaldown
? upgrade
? modules/syndication
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.815
diff -u -p -r1.815 common.inc
--- includes/common.inc	1 Nov 2008 21:21:34 -0000	1.815
+++ includes/common.inc	4 Nov 2008 05:50:37 -0000
@@ -1886,7 +1886,7 @@ function drupal_get_css($css = NULL) {
           continue;
         }
         // Only include the stylesheet if it exists.
-        if (file_exists($file)) {
+        if (file_exists($file) || menu_valid_path(array('link_path' => $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.
@@ -2279,11 +2279,13 @@ function drupal_get_js($scope = 'header'
         // If JS preprocessing is off, we still need to output the scripts.
         // Additionally, go through any remaining scripts if JS preprocessing is on and output the non-cached ones.
         foreach ($data as $path => $info) {
-          if (!$info['preprocess'] || !$is_writable || !$preprocess_js) {
-            $no_preprocess[$type] .= '<script type="text/javascript"' . ($info['defer'] ? ' defer="defer"' : '') . ' src="' . base_path() . $path . ($info['cache'] ? $query_string : '?' . REQUEST_TIME) . "\"></script>\n";
-          }
-          else {
-            $files[$path] = $info;
+          if (file_exists($path) || menu_valid_path(array('link_path' => $path))) {
+            if (!$info['preprocess'] || !$is_writable || !$preprocess_js) {
+              $no_preprocess[$type] .= '<script type="text/javascript"' . ($info['defer'] ? ' defer="defer"' : '') . ' src="' . base_path() . $path . ($info['cache'] ? $query_string : '?' . REQUEST_TIME) . "\"></script>\n";
+            }
+            else {
+              $files[$path] = $info;
+            }
           }
         }
     }
