1 installer.browser.inc | installer_browser_get_missing_dependencies($projects) |
Gets the dependencies for installed projects.
File
- core/
modules/ installer/ installer.browser.inc, line 453 - Various functions that are required by the Installer browse pages.
Code
function installer_browser_get_missing_dependencies($projects) {
$modules = system_rebuild_module_data();
$missing = array();
foreach ($projects as $project) {
if ($project['type'] == 'module') {
$dependencies = array();
if (isset($modules[$project['name']])) {
foreach ($modules[$project['name']]->requires as $requires) {
$dependency = $requires['name'];
if (!isset($modules[$dependency])) {
$dependencies[] = $dependency;
}
}
if (count($dependencies) > 0) {
$missing[$project['name']] = $dependencies;
}
}
else {
backdrop_set_message(t('There was an error getting information for @module',
array('@module' => $project['name'])), 'error');
}
}
}
return $missing;
}