From ba9c7b40f0dfcadf1d5711246e7b332ff7a60787 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 4 May 2011 18:53:11 +0000 Subject: - Apply fixes from trunk (up to r4728) --- program/steps/utils/error.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'program/steps/utils') diff --git a/program/steps/utils/error.inc b/program/steps/utils/error.inc index 4f4d6cbe7..be3c656d2 100644 --- a/program/steps/utils/error.inc +++ b/program/steps/utils/error.inc @@ -91,10 +91,11 @@ else { $__error_text = sprintf('Error No. [%s]', $ERROR_CODE); } +$HTTP_ERR_CODE = $ERROR_CODE && $ERROR_CODE < 600 ? $ERROR_CODE : 500; // Ajax request if ($OUTPUT && ($OUTPUT instanceof rcube_json_output)) { - header("HTTP/1.0 $ERROR_CODE $__error_title"); + header("HTTP/1.0 $HTTP_ERR_CODE $__error_title"); die; } @@ -112,12 +113,13 @@ if ($OUTPUT && $OUTPUT->template_exists('error')) { } $__skin = $CONFIG->skin ? $CONFIG->skin : 'default'; +$__productname = $CONFIG['product_name'] ? $CONFIG['product_name'] : 'Roundcube Webmail'; // print system error page print << -Roundcube|Mail : ERROR $ERROR_CODE +$__productname :: ERROR -- cgit v1.2.3