- Patch #807396 by David_Rothstein: remove old error handling from theme_update_page().

merge-requests/26/head
Dries Buytaert 2010-06-07 06:38:10 +00:00
parent e16e624c1c
commit 0f63b2214d
2 changed files with 1 additions and 14 deletions

View File

@ -2339,8 +2339,7 @@ function theme_get_suggestions($args, $base, $delimiter = '__') {
/**
* The variables array generated here is a mirror of template_preprocess_page().
* This preprocessor will run its course when theme_maintenance_page() is
* invoked. It is also used in theme_install_page() and theme_update_page() to
* keep all the variables consistent.
* invoked.
*
* An alternate template file of "maintenance-page--offline.tpl.php" can be
* used when the database is offline to hide errors and completely replace the
@ -2437,8 +2436,6 @@ function template_preprocess_maintenance_page(&$variables) {
/**
* The variables array generated here is a mirror of template_process_html().
* This processor will run its course when theme_maintenance_page() is invoked.
* It is also used in theme_install_page() and theme_update_page() to keep all
* the variables consistent.
*
* @see maintenance-page.tpl.php
*/

View File

@ -156,17 +156,7 @@ function theme_install_page($variables) {
* FALSE can be useful to postpone the messages to a subsequent page.
*/
function theme_update_page($variables) {
// Set required headers.
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
// 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', array('display' => 'warning'));
}
return theme('maintenance_page', $variables);
}