1 update.inc | update_upgrade_check_dependencies() |
Checks for disabled dependencies during a Drupal 7 upgrade.
Return value
string: A themed message that lists modules that will be enabled, to be displayed in the 'info' page of the update process.
File
- core/
includes/ update.inc, line 306 - Backdrop site update API.
Code
function update_upgrade_check_dependencies() {
$status_report = '';
if (backdrop_get_installed_schema_version('system') > 7000) {
// Set a state indicating we are upgrading a Drupal 7 site.
state_set('update_d7_upgrade', TRUE);
$modules_to_enable = update_upgrade_modules_to_enable();
if (empty($modules_to_enable)) {
return '';
}
$files = system_rebuild_module_data();
$module_list = '';
foreach ($modules_to_enable as $module_to_enable => $dependents) {
$module_list .= '<strong>' . $files[$module_to_enable]->info['name'] . '. ' . t('Required by:') . '</strong>';
$module_list .= theme('item_list', array('items' => $dependents));
}
$status_report = '<h4>' . t('Some modules need to be enabled') . '</h4>';
$status_report .= '<p>The following Backdrop modules will be enabled in order for the site to be upgraded successfully:</p>';
$status_report .= $module_list;
}
return $status_report;
}