From a5d180b9c0c49aa2eb277d0c0eab764fcf38ef73 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 2 Mar 2010 09:07:09 +0000 Subject: - Patch #347959 by sun, Damien Tournoud, justinrandell, scor, chx: modules_installed() was broken during testing. --- includes/module.inc | 7 +++---- includes/theme.inc | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'includes') diff --git a/includes/module.inc b/includes/module.inc index f5f66d7e9..0450e6b5b 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -293,12 +293,11 @@ function module_load_all_includes($type, $name = NULL) { * If TRUE, dependencies will automatically be added and enabled 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 $disable_modules_installed_hook - * Normally just testing wants to set this to TRUE. + * * @return * FALSE if one or more dependencies are missing, TRUE otherwise. */ -function module_enable($module_list, $enable_dependencies = TRUE, $disable_modules_installed_hook = FALSE) { +function module_enable($module_list, $enable_dependencies = TRUE) { if ($enable_dependencies) { // Get all module data so we can find dependencies and sort. $module_data = system_rebuild_module_data(); @@ -392,7 +391,7 @@ function module_enable($module_list, $enable_dependencies = TRUE, $disable_modul } // If any modules were newly installed, invoke hook_modules_installed(). - if (!$disable_modules_installed_hook && !empty($modules_installed)) { + if (!empty($modules_installed)) { module_invoke_all('modules_installed', $modules_installed); } diff --git a/includes/theme.inc b/includes/theme.inc index 87ab3c9ff..ebee7255a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -561,7 +561,7 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) { * - 'base theme': The name of the base theme. */ function list_themes($refresh = FALSE) { - static $list = array(); + $list = &drupal_static(__FUNCTION__, array()); if ($refresh) { $list = array(); -- cgit v1.2.3