[Svn] r4685 - in trunk/roundcubemail: . program/steps/utils

trac at roundcube.net trac at roundcube.net
Fri Apr 22 19:48:58 CEST 2011


Author: alec
Date: 2011-04-22 12:48:58 -0500 (Fri, 22 Apr 2011)
New Revision: 4685

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/steps/utils/error.inc
Log:
- Fix usage of non-standard HTTP error codes (#1487797)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-04-22 08:18:10 UTC (rev 4684)
+++ trunk/roundcubemail/CHANGELOG	2011-04-22 17:48:58 UTC (rev 4685)
@@ -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)

Modified: trunk/roundcubemail/program/steps/utils/error.inc
===================================================================
--- trunk/roundcubemail/program/steps/utils/error.inc	2011-04-22 08:18:10 UTC (rev 4684)
+++ trunk/roundcubemail/program/steps/utils/error.inc	2011-04-22 17:48:58 UTC (rev 4685)
@@ -91,10 +91,11 @@
     $__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 @@
 }
 
 $__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>

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list