core/includes/theme.inc | 8 +++++--- core/modules/system/system.module | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 0f4ac4d..3716fb7 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2356,6 +2356,8 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { * @param array $variables * An associative array containing: * - content - An array of page content. + * + * @see system_page_build() */ function template_preprocess_maintenance_page(&$variables) { global $theme; @@ -2425,7 +2427,7 @@ function template_preprocess_maintenance_page(&$variables) { // These are usually added from system_page_build() except maintenance.css. // When the database is inactive it's not called so we add it here. - $default_css['library'][] = array('system', 'drupal.base'); + $default_css['library'][] = array('system', 'normalize'); $path = drupal_get_path('module', 'system'); // Adjust the weights to load these early. $default_css['css'][$path . '/css/system.module.css'] = array( @@ -2445,8 +2447,8 @@ function template_preprocess_maintenance_page(&$variables) { 'weight' => CSS_COMPONENT - 10, 'every_page' => TRUE, ); - $attachment = array('#attached' => $default_css); - drupal_render($attachment); + $attached = array('#attached' => $default_css); + drupal_render($attached); $variables['head_title_array'] = $head_title; $variables['head_title'] = implode(' | ', $head_title); diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 3cf9e28..4dd9677 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2117,16 +2117,26 @@ function system_filetransfer_info() { /** * Implements hook_page_build(). + * + * @see template_preprocess_maintenance_page() */ function system_page_build(&$page) { // Ensure the same CSS is loaded in template_preprocess_maintenance_page(). $page['#attached']['library'][] = array('system', 'normalize'); $path = drupal_get_path('module', 'system'); // Adjust the weights to load these early. - $page['#attached']['css'][$path . '/css/system.module.css'] = array('weight' => CSS_COMPONENT - 10, 'every_page' => TRUE); - $page['#attached']['css'][$path . '/css/system.theme.css'] = array('weight' => CSS_SKIN - 10, 'every_page' => TRUE); + $page['#attached']['css'][$path . '/css/system.module.css'] = array( + 'weight' => CSS_COMPONENT - 10, + 'every_page' => TRUE, + ); + $page['#attached']['css'][$path . '/css/system.theme.css'] = array( + 'weight' => CSS_SKIN - 10, + 'every_page' => TRUE, + ); if (path_is_admin(current_path())) { - $page['#attached']['css'][$path . '/css/system.admin.css'] = array('weight' => CSS_COMPONENT - 10); + $page['#attached']['css'][$path . '/css/system.admin.css'] = array( + 'weight' => CSS_COMPONENT - 10, + ); } }