- Patch #200931 by Darren Oh, asimmonds: fixed schema not being available in hook_install()/hook_enable().

merge-requests/26/head
Dries Buytaert 2009-10-30 21:41:45 +00:00
parent fc81470ff3
commit d72539f1b5
1 changed files with 2 additions and 0 deletions

View File

@ -221,6 +221,8 @@ function module_enable($module_list, $disable_modules_installed_hook = FALSE) {
module_implements('', FALSE, TRUE);
// Force to regenerate the stored list of hook implementations.
registry_rebuild();
// Refresh the schema to include the new enabled module.
drupal_get_schema(NULL, TRUE);
// If any modules were newly installed, execute the hook for them.
if (!$disable_modules_installed_hook && !empty($modules_installed)) {