diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-28 09:29:23 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-28 09:29:23 +0000 |
commit | cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f (patch) | |
tree | 8bc6c50a09b84c4232fb2c8eafff42c25d5d8da7 /includes | |
parent | a76ee6c9ed66e61211bb05bfe9dd6229918557af (diff) | |
download | brdo-cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f.tar.gz brdo-cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f.tar.bz2 |
#54003, Watchdog not logging update errors, patch by Steven
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 3 | ||||
-rw-r--r-- | includes/theme.inc | 11 |
2 files changed, 10 insertions, 4 deletions
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('<link rel="shortcut icon" href="'. base_path() .'misc/favicon.ico" type="image/x-icon" />'); + $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; $output .= '<html xmlns="http://www.w3.org/1999/xhtml">'; $output .= '<head>'; @@ -439,13 +440,17 @@ function theme_maintenance_page($content) { $output .= '<body>'; $output .= '<h1>' . drupal_get_title() . '</h1>'; - $output .= theme('status_messages'); + if ($messages) { + $output .= theme('status_messages'); + } $output .= "\n<!-- begin content -->\n"; $output .= $content; $output .= "\n<!-- end content -->\n"; - $output .= '</body></html>'; + if (!$partial) { + $output .= '</body></html>'; + } return $output; } |