diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-04-22 17:48:58 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-04-22 17:48:58 +0000 |
| commit | 7ba0d165bb4042a051d688a5b0f7e3aba6a73dd3 (patch) | |
| tree | 987be46833697714915c277e901c3a2e1db39367 /roundcubemail/program | |
| parent | 0ef4707dd2ff95a0b3e809db7194e5b1b759f63e (diff) | |
- Fix usage of non-standard HTTP error codes (#1487797)
git-svn-id: https://svn.roundcube.net/trunk@4685 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/steps/utils/error.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/utils/error.inc b/roundcubemail/program/steps/utils/error.inc index 8b0496911..63ba21689 100644 --- a/roundcubemail/program/steps/utils/error.inc +++ b/roundcubemail/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 <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> -<title>Roundcube|Mail : ERROR $ERROR_CODE</title> +<title>$__productname :: ERROR</title> <link rel="stylesheet" type="text/css" href="skins/$__skin/common.css" /> </head> <body> |
