Index: includes/registry.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/registry.inc,v
retrieving revision 1.13
diff -u -r1.13 registry.inc
--- includes/registry.inc	3 Apr 2009 17:41:32 -0000	1.13
+++ includes/registry.inc	1 May 2009 22:58:13 -0000
@@ -41,7 +41,8 @@
   _registry_get_resource_name();
   // Get the list of files we are going to parse.
   $files = array();
-  foreach (module_rebuild_cache() as $module) {
+  $module_cache = module_rebuild_cache();
+  foreach ($module_cache as $module) {
     if ($module->status) {
       $dir = dirname($module->filepath);
       foreach ($module->info['files'] as $file) {
@@ -53,6 +54,10 @@
     $files["$filename"] = array('module' => '', 'weight' => 0);
   }
 
+  // Allow modules to manual add files for disabled modules. The $module_cache
+  // provides the info file information containing the list of files.
+  drupal_alter('registry_files', $files, $module_cache);
+
   foreach (registry_get_parsed_files() as $filename => $file) {
     // Add the md5 to those files we've already parsed.
     if (isset($files[$filename])) {
