diff --git a/includes/module.inc b/includes/module.inc index fc9b08c5a71..bb7d3262142 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -195,18 +195,16 @@ function system_list_reset() { */ function _module_build_dependencies($files) { require_once DRUPAL_ROOT . '/includes/graph.inc'; - $roots = $files; foreach ($files as $filename => $file) { $graph[$file->name]['edges'] = array(); if (isset($file->info['dependencies']) && is_array($file->info['dependencies'])) { foreach ($file->info['dependencies'] as $dependency) { $dependency_data = drupal_parse_dependency($dependency); $graph[$file->name]['edges'][$dependency_data['name']] = $dependency_data; - unset($roots[$dependency_data['name']]); } } } - drupal_depth_first_search($graph, array_keys($roots)); + drupal_depth_first_search($graph); foreach ($graph as $module => $data) { $files[$module]->required_by = isset($data['reverse_paths']) ? $data['reverse_paths'] : array(); $files[$module]->requires = isset($data['paths']) ? $data['paths'] : array();