Added search for "x-mailer" and "disposition notification to" and add it to
[squirrelmail.git] / plugins / listcommands / setup.php
index eb16d82868c1a452ea3ac252b0d15f0bb59c6607..0c18b48a5067a390e86c627ef01c03c62ee482b4 100644 (file)
@@ -22,7 +22,9 @@ function squirrelmail_plugin_init_listcommands () {
 
 function plugin_listcommands_menu() {
     global $imapConnection, $passed_id, $color, $mailbox,
-           $subject, $ent_num, $priority_level, $compose_new_win;
+           $message, $ent_num, $priority_level, $compose_new_win;
+
+    $subject = trim($message->header->subject);
 
     /**
      * Array of commands we can deal with from the header. The Reply option
@@ -84,7 +86,7 @@ function plugin_listcommands_menu() {
                 $url .= '&' . $purl['query'];
             }
             if ($compose_new_win == '1') {
-                $output[] = '<A HREF="' . $url . '" target="compose_window" onClick="comp_in_new()">' . $fieldsdescr[$cmd] . '</A>';
+                $output[] = "<a href=\"javascript:void(0)\" onclick=\"comp_in_new(false,'$url')\">" . $fieldsdescr[$cmd] . '</A>';
             }
             else {
                 $output[] = '<A HREF="' . $url . '">' . $fieldsdescr[$cmd] . '</A>';
@@ -95,7 +97,7 @@ function plugin_listcommands_menu() {
                       . '&amp;ent_num=' . $ent_num
                       . '&amp;mailprio=' . $priority_level;
                 if ($compose_new_win == '1') {
-                    $output[] = '<A HREF="' . $url . '" target="compose_window" onClick="comp_in_new()">' . $fieldsdescr['Reply'] . '</A>';
+                    $output[] = "<A HREF=\"javascript:void(0)\" onClick=\"comp_in_new(false,'$url')\">" . $fieldsdescr['Reply'] . '</A>';
                 }
                 else {
                     $output[] = '<A HREF="' . $url . '">' . $fieldsdescr['Reply'] . '</A>';
@@ -109,13 +111,12 @@ function plugin_listcommands_menu() {
 
     if (count($output) > 0) {
         echo "<tr>";
-        echo "<td ALIGN=RIGHT BGCOLOR=\"$color[0]\">"
-           .   str_replace(' ', '&nbsp;', _("Mailing List:"))
-           . '</td>';
-        echo "<td BGCOLOR=\"$color[0]\" WIDTH=\"100%\" colspan=\"2\">"
-           .   '<SMALL>' . implode('&nbsp;|&nbsp;', $output) . '</SMALL>'
-           . '</td>';
-        echo '</tr>';
+        echo html_tag( 'tr',
+                    html_tag( 'td', str_replace(' ', '&nbsp;', _("Mailing List:")), 'right', $color[0]) .
+                    html_tag( 'td',
+                        '<small>' . implode('&nbsp;|&nbsp;', $output) . '</small>' ,
+                    'left', $color[0], 'width="100%" colspan="2"')
+                );
     }
 }