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
if (($cmd == 'Post') || ($cmd == 'Owner')) {
$url = 'compose.php?';
} else {
- $url = "../plugins/listcommands/mailout.php?action=$cmd&";
+ $url = "../plugins/listcommands/mailout.php?action=$cmd&";
}
$url .= 'mailbox=' . urlencode($mailbox)
- . '&send_to=' . $purl['path'];
+ . '&send_to=' . $purl['path'];
if (isset($purl['query'])) {
- $url .= '&' . $purl['query'];
+ $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>';
}
if ($cmd == 'Post') {
- $url .= '&reply_subj=' . urlencode($subject)
- . '&reply_id=' . $passed_id
- . '&ent_num=' . $ent_num
- . '&mailprio=' . $priority_level;
- if ($compose_new_win == '1') {
- $output[] = '<A HREF="' . $url . '" target="compose_window" onClick="comp_in_new()">' . $fieldsdescr['Reply'] . '</A>';
- }
- else {
- $output[] = '<A HREF="' . $url . '">' . $fieldsdescr['Reply'] . '</A>';
- }
+ $url .= '&reply_subj=' . urlencode($subject)
+ . '&reply_id=' . $passed_id
+ . '&ent_num=' . $ent_num
+ . '&mailprio=' . $priority_level;
+ if ($compose_new_win == '1') {
+ $output[] = "<A HREF=\"javascript:void(0)\" onClick=\"comp_in_new(false,'$url')\">" . $fieldsdescr['Reply'] . '</A>';
+ }
+ else {
+ $output[] = '<A HREF="' . $url . '">' . $fieldsdescr['Reply'] . '</A>';
+ }
}
} else if (eregi('^(http|ftp)', $url)) {
$output[] = '<A HREF="' . $url . '" TARGET="_blank">'
if (count($output) > 0) {
echo "<tr>";
- echo "<td BGCOLOR=\"$color[0]\">"
- . str_replace(' ', ' ', _("Mailing List:"))
- . '</td>';
- echo "<td BGCOLOR=\"$color[0]\" WIDTH=\"100%\" colspan=\"2\">"
- . '<SMALL>' . implode(' | ', $output) . '</SMALL>'
- . '</td>';
- echo '</tr>';
+ echo html_tag( 'tr',
+ html_tag( 'td', str_replace(' ', ' ', _("Mailing List:")), 'right', $color[0]) .
+ html_tag( 'td',
+ '<small>' . implode(' | ', $output) . '</small>' ,
+ 'left', $color[0], 'width="100%" colspan="2"')
+ );
}
}