summaryrefslogtreecommitdiff
path: root/includes/install.inc
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2013-05-08 06:45:20 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2013-05-08 06:45:20 -0700
commitbafefe41a64f7f02363c3bfe03392bb50c613a2b (patch)
tree4cf7850d7f0e46f1d6ce8eaf2cf4acbe4b8560c0 /includes/install.inc
parentf1dd15f3e678f9c183600c30edeca96c425f1338 (diff)
downloadbrdo-bafefe41a64f7f02363c3bfe03392bb50c613a2b.tar.gz
brdo-bafefe41a64f7f02363c3bfe03392bb50c613a2b.tar.bz2
Issue #1980072 by TravisCarden: Improve documentation of drupal_uninstall_modules
Diffstat (limited to 'includes/install.inc')
-rw-r--r--includes/install.inc33
1 files changed, 20 insertions, 13 deletions
diff --git a/includes/install.inc b/includes/install.inc
index c4bcb88b2..e2a5195bd 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -741,20 +741,27 @@ function drupal_install_system() {
}
/**
- * Uninstalls a given list of modules.
+ * Uninstalls a given list of disabled modules.
*
- * @param $module_list
+ * Modules that are still enabled will be silently ignored.
+ *
+ * @param array $module_list
* The modules to uninstall.
- * @param $uninstall_dependents
- * If TRUE, the function will check that all modules which depend on the
- * passed-in module list either are already uninstalled or contained in the
- * list, and it will ensure that the modules are uninstalled in the correct
- * order. This incurs a significant performance cost, so use FALSE if you
- * know $module_list is already complete and in the correct order.
+ * @param bool $uninstall_dependents
+ * (optional) If TRUE, the function will check that all modules which depend
+ * on the passed-in module list either are already uninstalled or contained in
+ * the list, and it will ensure that the modules are uninstalled in the
+ * correct order. This incurs a significant performance cost, so use FALSE if
+ * you know $module_list is already complete and in the correct order.
+ * Defaults to TRUE.
*
- * @return
- * FALSE if one or more dependent modules are missing from the list, TRUE
- * otherwise.
+ * @return bool
+ * Returns TRUE if the operation succeeds or FALSE if it aborts due to an
+ * unsafe condition, namely, $uninstall_dependents is TRUE and a module in
+ * $module_list has dependents which are not already uninstalled and not also
+ * included in $module_list).
+ *
+ * @see module_disable()
*/
function drupal_uninstall_modules($module_list = array(), $uninstall_dependents = TRUE) {
if ($uninstall_dependents) {
@@ -766,7 +773,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents
$profile = drupal_get_profile();
while (list($module) = each($module_list)) {
if (!isset($module_data[$module]) || drupal_get_installed_schema_version($module) == SCHEMA_UNINSTALLED) {
- // This module doesn't exist or is already uninstalled, skip it.
+ // This module doesn't exist or is already uninstalled. Skip it.
unset($module_list[$module]);
continue;
}
@@ -799,7 +806,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents
}
if (!empty($module_list)) {
- // Call hook_module_uninstall to let other modules act
+ // Let other modules react.
module_invoke_all('modules_uninstalled', $module_list);
}