From 32ca1f9fc8a78e092565b51cc97faa724bb4e6cf Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 30 May 2009 05:09:57 -0400
Subject: [PATCH] - css fixes (#1485869)

---
 program/steps/error.inc |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/program/steps/error.inc b/program/steps/error.inc
index cec53ea..f8bb846 100644
--- a/program/steps/error.inc
+++ b/program/steps/error.inc
@@ -5,7 +5,7 @@
  | program/steps/error.inc                                               |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -81,20 +81,23 @@
   if (($CONFIG['debug_level'] & 4) && $ERROR_MESSAGE)
     $__error_text = $ERROR_MESSAGE;
   else
-    $__error_text = sprintf('Error No. [0x%04X]', $ERROR_CODE);
+    $__error_text = sprintf('Error No. [%s]', $ERROR_CODE);
 }
 
 
-// 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