diff --git a/includes/common.inc b/includes/common.inc index 01834ae70245cfc484712a54b119a7f2b11fa94e..3a13bdba622aea3492ebdc0de44eec909c287be3 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1341,12 +1341,15 @@ function _drupal_bootstrap_full() { drupal_set_header('Content-Type: text/html; charset=utf-8'); // Detect string handling method unicode_check(); - // Initialize all enabled modules. - module_init(); // Undo magic quotes fix_gpc_magic(); - // Initialize the localization system. + // Load all enabled modules + module_load_all(); + // Initialize the localization system. Depends on i18n.module being loaded already. $locale = locale_initialize(); + // Let all modules take action before menu system handles the reqest + module_invoke_all('init'); + } /** diff --git a/includes/module.inc b/includes/module.inc index 5cf5fc4641f4a726d3840c09b12dcfac8b3e10f0..b3c076250961dd688d515f6de9aadeb6e85e41b3 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -7,14 +7,12 @@ */ /** - * Initialize all modules. + * Load all the modules that have been enabled in the system table. */ -function module_init() { - // Load all the modules that have been enabled in the system table. +function module_load_all() { foreach (module_list(TRUE, FALSE) as $module) { drupal_load('module', $module); } - module_invoke_all('init'); } /**