diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 1ecd819..bc78168 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -936,7 +936,7 @@ function install_display_output($output, $install_state) { // Let the theming function know when every step of the installation has // been completed. $active_task = $install_state['installation_finished'] ? NULL : $install_state['active_task']; - drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task))); + drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task, 'variant' => 'install'))); } print theme('install_page', array('content' => $output)); exit; diff --git a/core/includes/install.inc b/core/includes/install.inc index 1abb0f8..b0ca296 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -95,7 +95,7 @@ function drupal_install_profile_distribution_name() { // installation state (it might not be saved anywhere yet). if (drupal_installation_attempted()) { global $install_state; - return $install_state['profile_info']['distribution_name']; + return isset($install_state['profile_info']['distribution_name']) ? $install_state['profile_info']['distribution_name'] : 'Drupal'; } // At all other times, we load the profile via standard methods. else { diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 45737c5..12388aa 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -3047,6 +3047,40 @@ function template_process_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(); +} + +/** + * Preprocess variables for install-page.html.twig. + * + * @see install-page.html.twig + * @see template_process_html() + * + */ +function template_process_install_page(&$variables) { + template_process_maintenance_page($variables); +} + +/** * Preprocess variables for region.tpl.php * * Prepares the values passed to the theme_region function to be passed into a @@ -3152,10 +3186,11 @@ function drupal_common_theme() { 'template' => 'maintenance-page', ), 'install_page' => array( - 'variables' => array('content' => NULL), + 'variables' => array('content' => NULL, 'show_messages' => TRUE), + 'template' => 'install-page', ), 'task_list' => array( - 'variables' => array('items' => NULL, 'active' => NULL), + 'variables' => array('items' => NULL, 'active' => NULL, 'variant' => NULL), ), 'authorize_message' => array( 'variables' => array('message' => NULL, 'success' => TRUE), diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index 0077f88..e113371 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -115,16 +115,23 @@ function _theme_load_offline_registry($theme, $base_theme = NULL, $theme_engine * An associative array containing: * - items: An associative array of maintenance tasks. * - active: The key for the currently active maintenance task. + * - variant: A variant name to be used for a CSS class. * * @ingroup themeable */ function theme_task_list($variables) { $items = $variables['items']; $active = $variables['active']; + if (isset($variables['variant'])) { + $class = $variables['variant'] . '-task-list'; + } + else { + $class = 'task-list'; + } $done = isset($items[$active]) || $active == NULL; $output = '