From 6925adb279131224d48ff8d5cb0f57aa9f167916 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 20 Sep 2008 08:44:46 -0400
Subject: [PATCH] Fix empty subject header display (#1485383) + improve safari CSS hacks

---
 skins/default/mail.css      |   11 ++++++-----
 program/steps/mail/func.inc |    6 ++----
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 5676757..928dce3 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -774,10 +774,6 @@
   if (!$headers)
     $headers = is_object($MESSAGE->headers) ? get_object_vars($MESSAGE->headers) : $MESSAGE->headers;
     
-  // add empty subject if none exsists
-  if (empty($headers['subject']))
-    $headers['subject'] = rcube_label('nosubject');
-
   $header_count = 0;
   
   // allow the following attributes to be added to the <table> tag
@@ -808,6 +804,8 @@
       }
     else if (in_array($hkey, array('from', 'to', 'cc', 'bcc')))
       $header_value = Q(rcmail_address_string($headers[$hkey], null, true, $attrib['addicon']), 'show');
+    else if ($hkey == 'subject' && empty($headers[$hkey]))
+      $header_value = Q(rcube_label('nosubject'));
     else
       $header_value = Q(trim($IMAP->decode_header($headers[$hkey])));
 
diff --git a/skins/default/mail.css b/skins/default/mail.css
index fc47d00..0ddff7f 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -440,11 +440,6 @@
   width: expression(parseInt(document.getElementById('mailcontframe').clientWidth)+'px');
 }
 
-/* safari hack \*/
-html>body*#messagelist[id$="messagelist"]:not([class="none"]) { width: 99%; }
-html>body*input[type$="file"]:not([class="none"]) { background-color: transparent; border:0; }
-/**/
-
 #messagelist thead tr td
 {
   height: 20px;
@@ -604,6 +599,12 @@
   color: #CCCCCC;
 }
 
+/* safari hacks \*/
+html>body*#messagelist[id$="messagelist"]:not([class="none"]) { width: 99.8%; }
+html>body*#messagelist[id$="messagelist"]:not([class="none"]) tr td.flag,
+html>body*#messagelist[id$="messagelist"]:not([class="none"]) tr td.icon { width: 20px; }
+html>body*input[type$="file"]:not([class="none"]) { background-color: transparent; border: 0; }
+/**/
 
 #quotadisplay
 {

--
Gitblit v1.9.1