diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index e8b47041299c2a89c694e3b076ea699c24e2c7d5..e602847d1670fd21b8b9867a2673ac952825ae6d 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -44,18 +44,18 @@ function _drupal_maintenance_theme() { spl_autoload_register('db_autoload'); } - // Ensure that system.module is loaded. - if (!function_exists('_system_rebuild_theme_data')) { - $module_list['system']['filename'] = 'modules/system/system.module'; - module_list(TRUE, FALSE, FALSE, $module_list); - drupal_load('module', 'system'); - } - // We use the default theme as the maintenance theme. If a default theme // isn't specified in the database or in settings.php, we use Garland. $custom_theme = variable_get('maintenance_theme', variable_get('theme_default', 'garland')); } + // Ensure that system.module is loaded. + if (!function_exists('_system_rebuild_theme_data')) { + $module_list['system']['filename'] = 'modules/system/system.module'; + module_list(TRUE, FALSE, FALSE, $module_list); + drupal_load('module', 'system'); + } + $themes = list_themes(); // list_themes() triggers a drupal_alter() in maintenance mode, but we can't