From ce19c671106df767202972d22736db3582f6423b Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 21 Jun 2010 02:27:47 +0000 Subject: #293223 follow-up by David_Rothstein: Roll back 'Hide required core modules'. This was removing useful information to both new and experienced site builders, as well as hiding critical 'help' links. --- modules/system/system.admin.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/system/system.admin.inc') diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 32490fee2..152d2982c 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -828,7 +828,7 @@ function system_modules($form, $form_state = array()) { // Remove hidden modules from display list. $visible_files = $files; foreach ($visible_files as $filename => $file) { - if (!empty($file->info['hidden']) || !empty($file->info['required'])) { + if (!empty($file->info['hidden'])) { unset($visible_files[$filename]); } } @@ -849,10 +849,19 @@ function system_modules($form, $form_state = array()) { // Used when checking if module implements a help page. $help_arg = module_exists('help') ? drupal_help_arg() : FALSE; + // Used when displaying modules that are required by the install profile. + require_once DRUPAL_ROOT . '/includes/install.inc'; + $distribution_name = check_plain(drupal_install_profile_distribution_name()); + // Iterate through each of the modules. foreach ($visible_files as $filename => $module) { $extra = array(); $extra['enabled'] = (bool) $module->status; + if (!empty($module->info['required'] )) { + $extra['disabled'] = TRUE; + $extra['required_by'][] = $distribution_name; + } + // If this module requires other modules, add them to the array. foreach ($module->requires as $requires => $v) { if (!isset($files[$requires])) { @@ -929,6 +938,7 @@ function system_modules($form, $form_state = array()) { } $form['modules'][$module->info['package']][$filename] = _system_modules_build_row($module->info, $extra); } + // Add basic information to the fieldsets. foreach (element_children($form['modules']) as $package) { $form['modules'][$package] += array( -- cgit v1.2.3