diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index 37775e6..e96b5b8 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -32,7 +32,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 @@ -50,7 +50,15 @@ 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', config('system.theme')->get('default')) ?: 'bartik'; + if (isset($conf['system.theme']['maintenance'])) { + $custom_theme = $conf['system.theme']['maintenance']; + } + elseif (config('system.theme')->get('default')) { + $custom_theme = config('system.theme')->get('default'); + } + else { + $custom_theme = 'bartik'; + } } // Ensure that system.module is loaded. diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index b2fbc90..ceffa39 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -543,11 +543,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: