X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fmailbox_display.php;h=1468e80f460be6c0ba15ca3a4722c1462ab98977;hp=95adfcd0ee94f489c9b57d76211052a2a79dbd56;hb=79dd8c728f29d35dc3f971cd936e164927002bde;hpb=e961d845af2ca47ebfd03609ffbf1e3cce529556 diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 95adfcd0..1468e80f 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -569,7 +569,7 @@ function prepareMessageList(&$aMailbox, $aProps) { $sTrunc = truncateWithEntities($sTmp, $aColumnDesc[$k]['truncate']); if ($sTrunc != $sTmp) { if (!$title) { - $title = htmlspecialchars($sTmp); + $title = $sTmp; } else if ($title_maybe) { $title = $title .', '.$title_maybe; $title = substr($title,0,-2); // strip ', '; @@ -1381,7 +1381,8 @@ function handleMessageListForm($imapConnection, &$aMailbox, $sButton='', break; default: // Hook for plugin buttons - do_hook('mailbox_display_button_action', $aUid); + $temp = array(&$sButton, &$aMailbox, $iAccount, $aMailbox['NAME'], &$aUid); + do_hook('mailbox_display_button_action', $temp); break; } /** @@ -1490,7 +1491,15 @@ function handleMessageListForm($imapConnection, &$aMailbox, $sButton='', sqimap_run_command($imapConnection,'CLOSE',false,$result,$message); $aMailbox = sqm_api_mailbox_select($imapConnection,$iAccount, $aMailbox['NAME'],array(),array()); } else { - if ($sButton) { + // this is the same hook as above, but here it is called in the + // context of not having had any messages selected and if any + // plugin handles the situation, it should return TRUE so we + // know this was not an erroneous user action + // + global $null; + $temp = array(&$sButton, &$aMailbox, $iAccount, $aMailbox['NAME'], $null); + if (!boolean_hook_function('mailbox_display_button_action', $temp, 1) + && $sButton) { $sError = _("No messages were selected."); } } @@ -1549,8 +1558,7 @@ function attachSelectedMessages($imapConnection,$aMsgHeaders) { fwrite ($fp, $body); fclose($fp); - $composeMessage->initAttachment('message/rfc822',$subject.'.msg', - $filename); + $composeMessage->initAttachment('message/rfc822', $subject . '.eml', $filename); } }