- Patch #592008 by moshe weitzman | chx: don't initialize theme system before modules are included.
parent
b544777095
commit
919d94be6e
|
@ -1388,6 +1388,9 @@ function drupal_anonymous_user($session = '') {
|
||||||
* @param $new_phase
|
* @param $new_phase
|
||||||
* A boolean, set to FALSE if calling drupal_bootstrap from inside a
|
* A boolean, set to FALSE if calling drupal_bootstrap from inside a
|
||||||
* function called from drupal_bootstrap (recursion).
|
* function called from drupal_bootstrap (recursion).
|
||||||
|
* @return
|
||||||
|
* The most recently completed phase.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
|
function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
|
||||||
$final_phase = &drupal_static(__FUNCTION__ . '_final_phase');
|
$final_phase = &drupal_static(__FUNCTION__ . '_final_phase');
|
||||||
|
|
|
@ -251,13 +251,18 @@ function _theme_load_registry($theme, $base_theme = NULL, $theme_engine = NULL)
|
||||||
$cache = cache_get("theme_registry:$theme->name", 'cache');
|
$cache = cache_get("theme_registry:$theme->name", 'cache');
|
||||||
if (isset($cache->data)) {
|
if (isset($cache->data)) {
|
||||||
$registry = $cache->data;
|
$registry = $cache->data;
|
||||||
|
_theme_set_registry($registry);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If not, build one and cache it.
|
// If not, build one and cache it.
|
||||||
$registry = _theme_build_registry($theme, $base_theme, $theme_engine);
|
$registry = _theme_build_registry($theme, $base_theme, $theme_engine);
|
||||||
_theme_save_registry($theme, $registry);
|
// Only persist this registry if all modules are loaded. This assures a
|
||||||
|
// complete set of theme hooks.
|
||||||
|
if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) {
|
||||||
|
_theme_save_registry($theme, $registry);
|
||||||
|
_theme_set_registry($registry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_theme_set_registry($registry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue