diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-01 22:10:07 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-11-01 22:10:07 +0000 |
commit | c409a47fcc482a332dcfcb6b85a742205a84a935 (patch) | |
tree | 5fd03b8d620347de1d6c6e2258ebbb83634c502a /includes/module.inc | |
parent | 45c7f0c02eefc05172b4c909e1cc1dd0507819c6 (diff) | |
download | brdo-c409a47fcc482a332dcfcb6b85a742205a84a935.tar.gz brdo-c409a47fcc482a332dcfcb6b85a742205a84a935.tar.bz2 |
#592008 follow-up by chx and moshe weitzman: All theme() function calls in hook_init().
Diffstat (limited to 'includes/module.inc')
-rw-r--r-- | includes/module.inc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/includes/module.inc b/includes/module.inc index cd2821e4f..975aaf29d 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -6,16 +6,30 @@ * API for loading and interacting with Drupal modules. */ - /** * Load all the modules that have been enabled in the system table. + * + * @param $bootstrap + * Whether to load only the reduced set of modules loaded in "bootstrap mode" + * for cached pages. See bootstrap.inc. + * @return + * If $bootstrap is NULL, return a boolean indicating whether all modules + * have been loaded. */ function module_load_all($bootstrap = FALSE) { - foreach (module_list(TRUE, $bootstrap) as $module) { - drupal_load('module', $module); + static $has_run = FALSE; + + if (isset($bootstrap)) { + foreach (module_list(TRUE, $bootstrap) as $module) { + drupal_load('module', $module); + } + // $has_run will be TRUE if $bootstrap is FALSE. + $has_run = !$bootstrap; } + return $has_run; } + /** * Collect a list of all loaded modules. During the bootstrap, return only * vital modules. See bootstrap.inc |