diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 928694d..e1b3017 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -990,7 +990,7 @@ function install_display_output($output, $install_state) { ); drupal_add_region_content('sidebar_first', drupal_render($task_list)); } - $install_page = array('#theme' => 'install_page', '#content' => $output); + $install_page = array('#theme' => 'maintenance_page__install', '#content' => $output); print drupal_render($install_page); exit; } diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 3d57521..0a4de6c 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -657,6 +657,9 @@ function _theme($hook, $variables = array()) { break; } } + // Add suggestions to the $info array so preprocessors have access to the + // full list of suggestions. + $info['suggestions'] = $suggestions; // Invoke the variable preprocessors, if any. if (isset($info['base hook'])) { @@ -2364,7 +2367,12 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { * * @see system_page_build() */ -function template_preprocess_maintenance_page(&$variables) { +function template_preprocess_maintenance_page(&$variables, $hook, $info) { + if (in_array('maintenance_page__install', $info['suggestions'])) { + // Override the site name that is displayed on the page, since Drupal is + // still in the process of being installed. + $variables['site_name'] = drupal_install_profile_distribution_name(); + } $language_interface = language(Language::TYPE_INTERFACE); // Initializes attributes which are specific to the html element. @@ -2513,29 +2521,6 @@ function template_preprocess_maintenance_page(&$variables) { } /** - * Prepares variables for install page templates. - * - * Default template: install-page.html.twig. - * - * The variables array generated here is a mirror of - * template_preprocess_page(). This preprocessor will run its course when - * theme_install_page() is invoked. - * - * @param array $variables - * An associative array containing: - * - content - An array of page content. - * - * @see template_preprocess_maintenance_page() - * - */ -function template_preprocess_install_page(&$variables) { - template_preprocess_maintenance_page($variables); - // Override the site name that is displayed on the page, since Drupal is - // still in the process of being installed. - $variables['site_name'] = drupal_install_profile_distribution_name(); -} - -/** * Prepares variables for region templates. * * Default template: region.html.twig. @@ -2643,10 +2628,6 @@ function drupal_common_theme() { 'variables' => array('content' => NULL, 'show_messages' => TRUE, 'page' => array()), 'template' => 'maintenance-page', ), - 'install_page' => array( - 'variables' => array('content' => NULL, 'show_messages' => TRUE), - 'template' => 'install-page', - ), 'task_list' => array( 'variables' => array('items' => NULL, 'active' => NULL, 'variant' => NULL), ), diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/install-page.html.twig deleted file mode 100644 index a462a5a..0000000 --- a/core/modules/system/templates/install-page.html.twig +++ /dev/null @@ -1,66 +0,0 @@ -{# -/** - * @file - * Default theme implementation to display a Drupal installation page. - * - * All the available variables are mirrored in html.html.twig and - * page.html.twig. Some may be blank but they are provided for consistency. - * - * @see template_preprocess_install_page() - * - * @ingroup themeable - */ -#} - - -
- {{ head }} -