Commit b8a7b8a8 authored by Dries's avatar Dries

- Patch #508056 by Stevel: _module_build_dependencies() calls...

- Patch #508056 by Stevel: _module_build_dependencies() calls drupal_depth_first_search() with wrong param count.
parent 6b6ea89a
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment