summaryrefslogtreecommitdiff
path: root/program/steps/error.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-26 16:54:55 +0000
committeralecpl <alec@alec.pl>2009-05-26 16:54:55 +0000
commitac4882f35d73aa843ded043f1b03900ddbb1104d (patch)
tree85915a91759fb49d9851735e97746f5da3aa4260 /program/steps/error.inc
parenteaf947cef627a8d48243d433dce9d1e13cebe004 (diff)
- fix errors handling in ajax requests (#1485872)
Diffstat (limited to 'program/steps/error.inc')
-rw-r--r--program/steps/error.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/error.inc b/program/steps/error.inc
index a42a1f680..f8bb8461d 100644
--- a/program/steps/error.inc
+++ b/program/steps/error.inc
@@ -85,8 +85,13 @@ else {
}
-// 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>
@@ -94,8 +99,6 @@ $__page_content = <<<EOF
</div>
EOF;
-
-
if ($OUTPUT && $OUTPUT->template_exists('error')) {
$OUTPUT->reset();
$OUTPUT->send('error');