squirrelmail / clicking on empty subject

squirrelmail / clicking on empty subject

  • Written by
    Walter Doekes
  • Published on

SquirrelMail on Debian/Wheezy (2:1.4.23~svn20120406-2) stopped showing (none) for e-mails that lack a subject. Now I cannot open any subject-less mail because there is nothing to click on.

The quick fix:

--- /usr/share/squirrelmail/functions/mailbox_display.php.orig  2014-08-15 10:37:37.000000000 +0200
+++ /usr/share/squirrelmail/functions/mailbox_display.php       2014-08-15 10:38:27.000000000 +0200
@@ -268,6 +268,9 @@ function printMessageInfo($imapConnectio
                     $title = str_replace('"', "''", $title);
                     $td_str .= " title=\"$title\"";
                 }
+                if (!$subject) {
+                    $subject = '(none)';
+                }
                 $td_str .= ">$flag$subject$flag_end</a>$bold_end";
                 echo html_tag( 'td', $td_str, 'left', $hlt_color );
                 break;

Back to overview Newer post: apt / hold upgrades / dependencies Older post: Import one database instead of all from sql dump