summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-05-09 13:49:33 +0000
committerDries Buytaert <dries@buytaert.net>2010-05-09 13:49:33 +0000
commit4d795f32474767aa6ed71add92405b6b30d9e498 (patch)
tree8e5bf81c39b994e6e7460c4bb7463152f9d9ed6a
parent5c19d3bd261756378727927b8bf478ebd691275e (diff)
downloadbrdo-4d795f32474767aa6ed71add92405b6b30d9e498.tar.gz
brdo-4d795f32474767aa6ed71add92405b6b30d9e498.tar.bz2
- Patch #793274 by matt2000: schema is left broken if hook_install() fails.
-rw-r--r--includes/module.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/module.inc b/includes/module.inc
index 4fe8f06ec..c9d2f4d71 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -375,10 +375,10 @@ 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);
- // Allow the module to perform install tasks.
- module_invoke($module, 'install');
$versions = drupal_get_schema_versions($module);
drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
+ // Allow the module to perform install tasks.
+ module_invoke($module, 'install');
// Record the fact that it was installed.
$modules_installed[] = $module;
watchdog('system', '%module module installed.', array('%module' => $module), WATCHDOG_INFO);