Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
221
Merge Requests
221
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
7f5caaac
Commit
7f5caaac
authored
Oct 01, 2010
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#915216
by catch, Damien Tournoud: Fixing update.php cannot apply updates error.
parent
bf751d9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
includes/module.inc
includes/module.inc
+12
-1
No files found.
includes/module.inc
View file @
7f5caaac
...
...
@@ -404,8 +404,19 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
// Now install the module if necessary.
if
(
drupal_get_installed_schema_version
(
$module
,
TRUE
)
==
SCHEMA_UNINSTALLED
)
{
drupal_install_schema
(
$module
);
// Set the schema version to the number of the last update provided
// by the module.
$versions
=
drupal_get_schema_versions
(
$module
);
drupal_set_installed_schema_version
(
$module
,
$versions
?
max
(
$versions
)
:
SCHEMA_INSTALLED
);
$version
=
$versions
?
max
(
$versions
)
:
SCHEMA_INSTALLED
;
// If the module has no current updates, but has some that were
// previously removed, set the version to the value of
// hook_update_last_removed().
if
(
$last_removed
=
module_invoke
(
$module
,
'update_last_removed'
))
{
$version
=
max
(
$version
,
$last_removed
);
}
drupal_set_installed_schema_version
(
$module
,
$version
);
// Allow the module to perform install tasks.
module_invoke
(
$module
,
'install'
);
// Record the fact that it was installed.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment