From cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Tue, 28 Mar 2006 09:29:23 +0000 Subject: #54003, Watchdog not logging update errors, patch by Steven --- includes/common.inc | 3 ++- includes/theme.inc | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 196fbab6f..e3e65528f 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -452,7 +452,8 @@ function error_handler($errno, $message, $filename, $line) { $types = array(1 => 'error', 2 => 'warning', 4 => 'parse error', 8 => 'notice', 16 => 'core error', 32 => 'core warning', 64 => 'compile error', 128 => 'compile warning', 256 => 'user error', 512 => 'user warning', 1024 => 'user notice', 2048 => 'strict warning'); $entry = $types[$errno] .': '. $message .' in '. $filename .' on line '. $line .'.'; - if (variable_get('error_level', 1) == 1) { + // Note: force display of error messages in update.php + if (variable_get('error_level', 1) == 1 || strstr($_SERVER['PHP_SELF'], 'update.php')) { drupal_set_message($entry, 'error'); } diff --git a/includes/theme.inc b/includes/theme.inc index c0e4f3b0c..ec085d946 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -425,10 +425,11 @@ function theme_page($content) { return $output; } -function theme_maintenance_page($content) { +function theme_maintenance_page($content, $messages = TRUE, $partial = FALSE) { drupal_set_header('Content-Type: text/html; charset=utf-8'); theme('add_style', 'misc/maintenance.css'); drupal_set_html_head(''); + $output = "\n"; $output .= ''; $output .= ''; @@ -439,13 +440,17 @@ function theme_maintenance_page($content) { $output .= ''; $output .= '

' . drupal_get_title() . '

'; - $output .= theme('status_messages'); + if ($messages) { + $output .= theme('status_messages'); + } $output .= "\n\n"; $output .= $content; $output .= "\n\n"; - $output .= ''; + if (!$partial) { + $output .= ''; + } return $output; } -- cgit v1.2.3