From d7b35c22affe6911f6f7338dc5ae602056da3eac Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 22 Apr 2011 17:48:58 +0000 Subject: - Fix usage of non-standard HTTP error codes (#1487797) --- CHANGELOG | 1 + program/steps/utils/error.inc | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5d9243d4f..51fba60b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix usage of non-standard HTTP error codes (#1487797) - Improve performance by including files with absolute path (#1487849) - TinyMCE 3.4.2 now compatible with IE9 - Move folder name truncation to client/skin (#1485412) diff --git a/program/steps/utils/error.inc b/program/steps/utils/error.inc index 8b0496911..63ba21689 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