diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-26 16:54:55 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-26 16:54:55 +0000 |
| commit | 996bd91367cf9f015a68f87ed1c7ad033c1e47ae (patch) | |
| tree | 961acf582cffe30a801fa61c9c8269524ae37b4a /roundcubemail/program/steps | |
| parent | 00a6cc077002b264c0a0014223b7e3df58faeeaf (diff) | |
- fix errors handling in ajax requests (#1485872)
git-svn-id: https://svn.roundcube.net/trunk@2547 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/error.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/error.inc b/roundcubemail/program/steps/error.inc index a42a1f680..f8bb8461d 100644 --- a/roundcubemail/program/steps/error.inc +++ b/roundcubemail/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'); |
