From ac4882f35d73aa843ded043f1b03900ddbb1104d Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 26 May 2009 16:54:55 +0000 Subject: - fix errors handling in ajax requests (#1485872) --- program/steps/error.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'program') 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 = <<

$__error_title

@@ -94,8 +99,6 @@ $__page_content = << EOF; - - if ($OUTPUT && $OUTPUT->template_exists('error')) { $OUTPUT->reset(); $OUTPUT->send('error'); -- cgit v1.2.3