From ac4882f35d73aa843ded043f1b03900ddbb1104d Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 26 May 2009 12:54:55 -0400
Subject: [PATCH] - fix errors handling in ajax requests (#1485872)
---
program/steps/error.inc | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/program/steps/error.inc b/program/steps/error.inc
index a42a1f6..f8bb846 100644
--- a/program/steps/error.inc
+++ b/program/steps/error.inc
@@ -85,16 +85,19 @@
}
-// compose page content
+// 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>
<p class="error-text">$__error_text</p>
</div>
EOF;
-
-
if ($OUTPUT && $OUTPUT->template_exists('error')) {
$OUTPUT->reset();
--
Gitblit v1.9.1