浏览代码

Bugfix, remove bcc and cc display when empty

philippe_mingo 23 年之前
父节点
当前提交
c8b66d81fb
共有 2 个文件被更改,包括 14 次插入16 次删除
  1. 4 4
      functions/mailbox_display.php
  2. 10 12
      src/read_body.php

+ 4 - 4
functions/mailbox_display.php

@@ -548,11 +548,11 @@ function mail_message_listing_beginning
     echo '</TD></TR>'.
     echo '</TD></TR>'.
 
 
         "<TR><TD BGCOLOR=\"$color[0]\">".
         "<TR><TD BGCOLOR=\"$color[0]\">".
-        "<TABLE WIDTH=\"100%\" BORDER=0 CELLPADDING=2 CELLSPACING=";
+        '<TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=';
     if ($GLOBALS['alt_index_colors']) {
     if ($GLOBALS['alt_index_colors']) {
-        echo "0";
+        echo '0';
     } else {
     } else {
-        echo "1";
+        echo '1';
     }
     }
     echo " BGCOLOR=\"$color[0]\">".
     echo " BGCOLOR=\"$color[0]\">".
         "<TR BGCOLOR=\"$color[5]\" ALIGN=\"center\">";
         "<TR BGCOLOR=\"$color[5]\" ALIGN=\"center\">";
@@ -943,4 +943,4 @@ function handleAsSent($mailbox) {
     return ($handleAsSent_result);
     return ($handleAsSent_result);
 }
 }
 
 
-?>
+?>

+ 10 - 12
src/read_body.php

@@ -755,7 +755,7 @@ echo       "<TR>\n" .
              '</TD>' . "\n" .
              '</TD>' . "\n" .
           '</TR>' . "\n";
           '</TR>' . "\n";
 /** cc **/
 /** cc **/
-if (isset($cc_string)) {
+if (isset($cc_string) && $cc_string <> '') {
     echo       '<TR>' .
     echo       '<TR>' .
                  "<TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>" .
                  "<TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>" .
                     'Cc:' .
                     'Cc:' .
@@ -766,7 +766,7 @@ if (isset($cc_string)) {
 }
 }
 
 
 /** bcc **/
 /** bcc **/
-if (isset($bcc_string)) {
+if (isset($bcc_string) && $bcc_string <> '') {
     echo       '<TR>'.
     echo       '<TR>'.
                  "<TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>" .
                  "<TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>" .
                     'Bcc:' .
                     'Bcc:' .
@@ -775,16 +775,14 @@ if (isset($bcc_string)) {
                  '</TD>' .
                  '</TD>' .
               '</TR>' . "\n";
               '</TR>' . "\n";
 }
 }
-if ($default_use_priority) {
-    if (isset($priority_string)) {
-        echo       '<TR>' .
-                     "<TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>" .
-                           _("Priority") . ': '.
-                     "</TD><TD BGCOLOR=\"$color[0]\" VALIGN=TOP colspan=2>" .
-                        "<B>$priority_string</B>&nbsp;" .
-                     '</TD>' .
-                  "</TR>" . "\n";
-    }
+if ($default_use_priority && isset($priority_string) && $priority_string <> '' ) {
+    echo       '<TR>' .
+                 "<TD BGCOLOR=\"$color[0]\" ALIGN=RIGHT VALIGN=TOP>" .
+                       _("Priority") . ': '.
+                 "</TD><TD BGCOLOR=\"$color[0]\" VALIGN=TOP colspan=2>" .
+                    "<B>$priority_string</B>&nbsp;" .
+                 '</TD>' .
+              "</TR>" . "\n";
 }
 }
 
 
 if ($show_xmailer_default) {
 if ($show_xmailer_default) {