From 8cf387a370b1e4f57369edc8267b2332977eea8e Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 10 Jul 2009 05:06:55 +0000 Subject: #454462 by JohnAlbin: Fire MODULE_preprocess_maintenance_page functions. --- includes/theme.maintenance.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'includes/theme.maintenance.inc') diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 3267e1d01..5445fc836 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -36,12 +36,15 @@ function _drupal_maintenance_theme() { $theme = 'minnelli'; } else { - // Load module basics (needed for hook invokes). - $module_list['system']['filename'] = 'modules/system/system.module'; - $module_list['filter']['filename'] = 'modules/filter/filter.module'; - module_list(TRUE, FALSE, $module_list); - drupal_load('module', 'system'); - drupal_load('module', 'filter'); + if (!db_is_active()) { + // Because we are operating in a crippled environment, we need to + // bootstrap just enough to allow hook invocations to work. + $module_list['system']['filename'] = 'modules/system/system.module'; + $module_list['filter']['filename'] = 'modules/filter/filter.module'; + module_list(TRUE, FALSE, $module_list); + drupal_load('module', 'system'); + drupal_load('module', 'filter'); + } $theme = variable_get('maintenance_theme', 'minnelli'); } -- cgit v1.2.3