diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index bd90379..e87d8df 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -34,7 +34,7 @@ function _drupal_maintenance_theme() { // Install and update pages are treated differently to prevent theming overrides. if (defined('MAINTENANCE_MODE') && (MAINTENANCE_MODE == 'install' || MAINTENANCE_MODE == 'update')) { - $custom_theme = (isset($conf['maintenance_theme']) ? $conf['maintenance_theme'] : 'seven'); + $custom_theme = isset($conf['system.theme']['maintenance']) ?: 'seven'; } else { // The bootstrap was not complete. So we are operating in a crippled @@ -52,7 +52,16 @@ function _drupal_maintenance_theme() { // Stark otherwise. Since there is no low-level access to configuration // currently, we only consult settings.php and fall back to Bartik // otherwise, as it looks generic enough and way more user-friendly. - $custom_theme = variable_get('maintenance_theme'); + if (isset($conf['system.theme']['maintenance'])) { + $custom_theme = $conf['system.theme']['maintenance']; + } + elseif (Drupal::config('system.theme')->get('default')) { + $custom_theme = Drupal::config('system.theme')->get('default'); + } + else { + $custom_theme = 'bartik'; + } + if (!$custom_theme) { $config = Drupal::config('system.theme'); // A broken install might not return an object. diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index fe16cfc..c6596b1 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -567,11 +567,12 @@ * A custom theme can be set for the offline page. This applies when the site * is explicitly set to maintenance mode through the administration page or when * the database is inactive due to an error. It can be set through the - * 'maintenance_theme' key. The template file should also be copied into the - * theme. It is located inside 'core/modules/system/maintenance-page.tpl.php'. + * $conf['system.theme']['maintenance']. The template file should also be copied + * into the theme. It is located inside + * 'core/modules/system/maintenance-page.tpl.php'. * Note: This setting does not apply to installation and update pages. */ -# $conf['maintenance_theme'] = 'bartik'; +# $conf['system.theme']['maintenance'] = 'bartik'; /** * CSS/JS aggregated file gzip compression: