Commit da7f3a0e authored by webchick's avatar webchick

#319699 follow-up by Dave Reid: Simplify required module hiding in admin/build/modules.

parent 3715107d
......@@ -8,3 +8,4 @@ core = 7.x
files[] = block.module
files[] = block.admin.inc
files[] = block.install
hidden = TRUE
......@@ -8,3 +8,4 @@ files[] = filter.module
files[] = filter.admin.inc
files[] = filter.pages.inc
files[] = filter.install
hidden = TRUE
......@@ -9,3 +9,4 @@ files[] = content_types.inc
files[] = node.admin.inc
files[] = node.pages.inc
files[] = node.install
hidden = TRUE
......@@ -637,16 +637,9 @@ function system_modules($form_state = array()) {
// Used when checking if module implements a help page.
$help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
// The list of required modules.
$modules_required = drupal_required_modules();
// Iterate through each of the modules.
foreach ($files as $filename => $module) {
$extra = array();
// If the module is requried, set it to be so.
if (in_array($filename, $modules_required)) {
continue;
}
$extra['enabled'] = (bool) $module->status;
// If this module has dependencies, add them to the array.
if (is_array($module->info['dependencies'])) {
......
......@@ -8,3 +8,4 @@ files[] = system.module
files[] = system.admin.inc
files[] = image.gd.inc
files[] = system.install
hidden = TRUE
......@@ -10,7 +10,7 @@ class EnableDisableCoreTestCase extends DrupalWebTestCase {
function getInfo() {
return array(
'name' => t('Module list functionality'),
'description' => t('Enable/disable core module and confirm table creation/deletion. Enable module without dependency enabled.'),
'description' => t('Enable/disable core module and confirm table creation/deletion. Enable module without dependency enabled. Attempt disabling of required modules.'),
'group' => t('System')
);
}
......@@ -93,9 +93,9 @@ class EnableDisableCoreTestCase extends DrupalWebTestCase {
*/
function testDisableRequired() {
$required_modules = drupal_required_modules();
$this->drupalGet('admin/build/modules');
foreach($required_modules as $module) {
// Check to make sure the checkbox for required module is not found.
$this->drupalGet('admin/build/modules');
$this->assertNoFieldByName('modules[Core][' . $module . '][enable]');
}
}
......
......@@ -8,3 +8,4 @@ files[] = user.module
files[] = user.admin.inc
files[] = user.pages.inc
files[] = user.install
hidden = TRUE
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