]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/utils/error.inc
Fix symlink mess
[roundcube.git] / program / steps / utils / error.inc
index 2a2763abee9d27376d90c0ce1b60251faf25581b..98e9d20516cc920d254953736ad5423e53d3d466 100644 (file)
@@ -5,7 +5,7 @@
  | program/steps/utils/error.inc                                         |
  |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
- | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2011, The Roundcube Dev Team                       |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -15,7 +15,7 @@
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 
- $Id: error.inc 4509 2011-02-09 10:51:50Z thomasb $
+ $Id: error.inc 4685 2011-04-22 17:48:58Z alec $
 
 */
 
@@ -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>