summaryrefslogtreecommitdiff
path: root/includes/registry.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-07 18:04:16 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-07 18:04:16 +0000
commit6d4d05aa9d997e72cbb152699e638b67e896d5ba (patch)
treef390e3908e93e84ea38f1a84c5d79eb65373b74f /includes/registry.inc
parent0ccac642b997dab993628bb187dd077388a7d146 (diff)
downloadbrdo-6d4d05aa9d997e72cbb152699e638b67e896d5ba.tar.gz
brdo-6d4d05aa9d997e72cbb152699e638b67e896d5ba.tar.bz2
- Patch #429132 by Berdir: remove unnecessary module_rebuild_cache().
Diffstat (limited to 'includes/registry.inc')
-rw-r--r--includes/registry.inc8
1 files changed, 7 insertions, 1 deletions
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);