Happy New Year
[squirrelmail.git] / src / right_main.php
index 94bd618ea01aa0babdaa388c8d21d6a964214d48..a2224ec41142a67666f1c0926889525eb8811bd0 100644 (file)
@@ -6,7 +6,7 @@
  * This is where the mailboxes are listed. This controls most of what
  * goes on in SquirrelMail.
  *
- * @copyright 1999-2010 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -88,7 +88,8 @@ if ( sqgetGlobalVar('account', $account, SQ_GET) ) {
 
 /* Open an imap connection */
 
-$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
+global $imap_stream_options; // in case not defined in config
+$imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
 
 $mailbox = (isset($mailbox) && $mailbox) ? $mailbox : 'INBOX';
 
@@ -236,6 +237,8 @@ if (!sqgetGlobalVar('align',$align,SQ_SESSION)) {
 $sError = handleMessageListForm($imapConnection,$aMailbox);
 if ($sError) {
    $note = $sError;
+} else if (sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'POST') {
+   $preselected = array(); // clear pre-checked checkboxes when action succeeded
 }
 
 
@@ -317,7 +320,7 @@ if (isset($mail_sent) && $mail_sent == 'yes') {
     $note = _("Your mail has been sent.");
 }
 if (isset($note)) {
-    $oTemplate->assign('note', htmlspecialchars($note));
+    $oTemplate->assign('note', sm_encode_html_special_chars($note));
     $oTemplate->display('note.tpl');
 }