fsf changes, meant to be rebased on upstream
[squirrelmail.git] / src / view_text.php
index 90c7215f0ae220240466d88e3313cc91ff2252d7..490069850bc8ab2cb2582bb7df5b207c9e7c0cd9 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Used by attachment_common code.
  *
- * @copyright 1999-2012 The SquirrelMail Project Team
+ * @copyright 1999-2024 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -29,7 +29,8 @@ sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET);
 sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
 sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
 
-$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);
 $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox);
 
 $message = &$messages[$mbx_response['UIDVALIDITY']][$passed_id];
@@ -38,7 +39,7 @@ if (!is_object($message)) {
 }
 $message_ent = $message->getEntity($ent_id);
 if ($passed_ent_id) {
-    $message = &$message->getEntity($passed_ent_id);
+    $message = $message->getEntity($passed_ent_id);
 }
 $header   = $message_ent->header;
 $type0    = $header->type0;