summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-08-29 23:12:18 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-08-29 23:12:18 -0700
commit16b5120350eccb2f40c1eea6b2a854bdf9dc87bb (patch)
tree0b5529208bc57030887b111fd996a6c04acf91eb /modules/system
parentb9f87d85b5e9e8544b81d26ab17859a28ef64d17 (diff)
downloadbrdo-16b5120350eccb2f40c1eea6b2a854bdf9dc87bb.tar.gz
brdo-16b5120350eccb2f40c1eea6b2a854bdf9dc87bb.tar.bz2
Issue #943772 by jpsoto, yched, catch, bojanz, pillarsdotnet, steinmb: Fixed field_delete_field() and others fail for inactive fields.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc2
-rw-r--r--modules/system/system.test45
2 files changed, 7 insertions, 40 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 0d3a8d7a8..46aa9c267 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -799,7 +799,7 @@ function system_modules($form, $form_state = array()) {
$extra['enabled'] = (bool) $module->status;
if (!empty($module->info['required'] )) {
$extra['disabled'] = TRUE;
- $extra['required_by'][] = $distribution_name;
+ $extra['required_by'][] = $distribution_name . (!empty($module->info['explanation']) ? ' ('. $module->info['explanation'] .')' : '');
}
// If this module requires other modules, add them to the array.
diff --git a/modules/system/system.test b/modules/system/system.test
index b69eed341..f273bc7d2 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -446,39 +446,6 @@ class ModuleDependencyTestCase extends ModuleTestCase {
}
/**
- * Tests re-enabling forum with taxonomy disabled.
- */
- function testEnableForumTaxonomyFieldDependency() {
- // Enable the forum module.
- $edit = array();
- $edit['modules[Core][forum][enable]'] = 'forum';
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('forum'), TRUE);
-
- // Disable the forum module.
- $edit = array();
- $edit['modules[Core][forum][enable]'] = FALSE;
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('forum'), FALSE);
-
- // Disable the taxonomy module.
- $edit = array();
- $edit['modules[Core][taxonomy][enable]'] = FALSE;
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('taxonomy'), FALSE);
-
- // Attempt to re-enable the forum module with taxonomy disabled and ensure
- // forum does not try to recreate the taxonomy_forums field.
- $edit = array();
- $edit['modules[Core][forum][enable]'] = 'forum';
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertText(t('Some required modules must be enabled'), t('Dependency required.'));
- $this->drupalPost(NULL, NULL, t('Continue'));
- $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
- $this->assertModules(array('taxonomy', 'forum'), TRUE);
- }
-
- /**
* Tests that module dependencies are enabled in the correct order via the
* UI. Dependencies should be enabled before their dependents.
*/
@@ -516,18 +483,18 @@ class ModuleDependencyTestCase extends ModuleTestCase {
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertModules(array('forum'), TRUE);
- // Disable forum and taxonomy. Both should now be installed but disabled.
+ // Disable forum and comment. Both should now be installed but disabled.
$edit = array('modules[Core][forum][enable]' => FALSE);
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertModules(array('forum'), FALSE);
- $edit = array('modules[Core][taxonomy][enable]' => FALSE);
+ $edit = array('modules[Core][comment][enable]' => FALSE);
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('taxonomy'), FALSE);
+ $this->assertModules(array('comment'), FALSE);
// Check that the taxonomy module cannot be uninstalled.
$this->drupalGet('admin/modules/uninstall');
- $checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="uninstall[taxonomy]"]');
- $this->assert(count($checkbox) == 1, t('Checkbox for uninstalling the taxonomy module is disabled.'));
+ $checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="uninstall[comment]"]');
+ $this->assert(count($checkbox) == 1, t('Checkbox for uninstalling the comment module is disabled.'));
// Uninstall the forum module, and check that taxonomy now can also be
// uninstalled.
@@ -535,7 +502,7 @@ class ModuleDependencyTestCase extends ModuleTestCase {
$this->drupalPost('admin/modules/uninstall', $edit, t('Uninstall'));
$this->drupalPost(NULL, NULL, t('Uninstall'));
$this->assertText(t('The selected modules have been uninstalled.'), t('Modules status has been updated.'));
- $edit = array('uninstall[taxonomy]' => 'taxonomy');
+ $edit = array('uninstall[comment]' => 'comment');
$this->drupalPost('admin/modules/uninstall', $edit, t('Uninstall'));
$this->drupalPost(NULL, NULL, t('Uninstall'));
$this->assertText(t('The selected modules have been uninstalled.'), t('Modules status has been updated.'));