From 6d4d05aa9d997e72cbb152699e638b67e896d5ba Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 7 May 2009 18:04:16 +0000 Subject: - Patch #429132 by Berdir: remove unnecessary module_rebuild_cache(). --- includes/registry.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'includes/registry.inc') diff --git a/includes/registry.inc b/includes/registry.inc index 3fb3a9964..ff6bdc950 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -39,10 +39,16 @@ function _registry_rebuild() { // Reset the resources cache. _registry_get_resource_name(); + + // Get current list of modules and their files. + $modules = drupal_system_listing('/\.module$/', 'modules', 'name', 0); + system_get_files_database($modules, 'module'); // Get the list of files we are going to parse. $files = array(); - foreach (module_rebuild_cache() as $module) { + foreach ($modules as $module) { if ($module->status) { + // Parse .info file only for enabled modules. + $module->info = drupal_parse_info_file(dirname($module->filepath) . '/' . $module->name . '.info'); $dir = dirname($module->filepath); foreach ($module->info['files'] as $file) { $files["$dir/$file"] = array('module' => $module->name, 'weight' => $module->weight); -- cgit v1.2.3