[Svn] r2547 - trunk/roundcubemail/program/steps

trac at roundcube.net trac at roundcube.net
Tue May 26 18:54:55 CEST 2009


Author: alec
Date: 2009-05-26 11:54:55 -0500 (Tue, 26 May 2009)
New Revision: 2547

Modified:
   trunk/roundcubemail/program/steps/error.inc
Log:
- fix errors handling in ajax requests (#1485872)


Modified: trunk/roundcubemail/program/steps/error.inc
===================================================================
--- trunk/roundcubemail/program/steps/error.inc	2009-05-26 16:30:59 UTC (rev 2546)
+++ trunk/roundcubemail/program/steps/error.inc	2009-05-26 16:54:55 UTC (rev 2547)
@@ -85,8 +85,13 @@
 }
 
 
+// Ajax request
+if ($OUTPUT && ($OUTPUT instanceof rcube_json_output)) {
+  header("HTTP/1.0 $ERROR_CODE $__error_title");
+  die;
+}
+
 // compose page content
-
 $__page_content = <<<EOF
 <div>
 <h3 class="error-title">$__error_title</h3>
@@ -94,8 +99,6 @@
 </div>
 EOF;
 
-
-
 if ($OUTPUT && $OUTPUT->template_exists('error')) {
   $OUTPUT->reset();
   $OUTPUT->send('error');

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



More information about the Svn mailing list