Same name and namespace in other branches
  1. 7.x includes/theme.maintenance.inc \theme_update_page()

Generate a themed update page.

Note: this function is not themeable.

Parameters

$content: The page content to show.

$show_messages: Whether to output status and error messages. FALSE can be useful to postpone the messages to a subsequent page.

1 theme call to theme_update_page()
update.php in ./update.php
Administrative page for handling updates from one Drupal version to another.

File

includes/theme.maintenance.inc, line 164
Theming for maintenance pages.

Code

function theme_update_page($content, $show_messages = TRUE) {

  // Set required headers.
  drupal_set_header('Content-Type: text/html; charset=utf-8');

  // Assign content and show message flag.
  $variables['content'] = $content;
  $variables['show_messages'] = $show_messages;

  // The maintenance preprocess function is recycled here.
  template_preprocess_maintenance_page($variables);

  // Special handling of warning messages.
  $messages = drupal_set_message();
  if (isset($messages['warning'])) {
    $title = count($messages['warning']) > 1 ? 'The following update warnings should be carefully reviewed before continuing' : 'The following update warning should be carefully reviewed before continuing';
    $variables['messages'] .= '<h4>' . $title . ':</h4>';
    $variables['messages'] .= theme('status_messages', 'warning');
  }

  // This was called as a theme hook (not template), so we need to
  // fix path_to_theme() for the template, to point at the actual
  // theme rather than system module as owner of the hook.
  global $theme_path;
  $theme_path = 'themes/garland';
  return theme_render_template('themes/garland/maintenance-page.tpl.php', $variables);
}