Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3253715
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3253715
Commits
bafefe41
Commit
bafefe41
authored
11 years ago
by
Jennifer Hodgdon
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1980072
by TravisCarden: Improve documentation of drupal_uninstall_modules
parent
f1dd15f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/install.inc
+20
-13
20 additions, 13 deletions
includes/install.inc
with
20 additions
and
13 deletions
includes/install.inc
+
20
−
13
View file @
bafefe41
...
...
@@ -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
, s
kip it.
// This module doesn't exist or is already uninstalled
. S
kip 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 l
et other modules act
//
L
et other modules
re
act
.
module_invoke_all
(
'modules_uninstalled'
,
$module_list
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment