summaryrefslogtreecommitdiff
path: root/includes/theme.maintenance.inc
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2008-01-16 10:37:43 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2008-01-16 10:37:43 +0000
commit44d71e1eef98b441ba93c4d60c709c1b56868d43 (patch)
tree33a649aa7f172db26bdc83db165a9c0bf31f3ccc /includes/theme.maintenance.inc
parentf16986574a592af2a3a1cda7c77d3b562aa65d66 (diff)
downloadbrdo-44d71e1eef98b441ba93c4d60c709c1b56868d43.tar.gz
brdo-44d71e1eef98b441ba93c4d60c709c1b56868d43.tar.bz2
#200674 by scor, catch: update.php should inform users if their memory limit will possibly result in a WSOD
Diffstat (limited to 'includes/theme.maintenance.inc')
-rw-r--r--includes/theme.maintenance.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc
index 19b7fc742..0b9b9fdbb 100644
--- a/includes/theme.maintenance.inc
+++ b/includes/theme.maintenance.inc
@@ -163,6 +163,14 @@ function theme_update_page($content, $show_messages = TRUE) {
// 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');
+ }
+
return theme_render_template('themes/garland/maintenance-page.tpl.php', $variables);
}