From b288e71e05c26496195690491e64e7d0e91bccd9 Mon Sep 17 00:00:00 2001 From: jmunro Date: Tue, 19 Mar 2002 07:23:02 +0000 Subject: [PATCH] added 'References:' and 'In-Reply-To:' to sqimap_get_small_header_list in preperation for improved reference handling in smtp.php. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2605 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_messages.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 031122c9..8a1e129b 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -95,7 +95,7 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $issent) { $id2index[$msg_list[$i]] = $i; } - $query = "$sid FETCH $msgs_str BODY.PEEK[HEADER.FIELDS (Date To From Cc Subject Message-Id X-Priority Content-Type)]\r\n"; + $query = "$sid FETCH $msgs_str BODY.PEEK[HEADER.FIELDS (Date To From Cc Subject Message-Id X-Priority Content-Type References In-Reply-To)]\r\n"; fputs ($imap_stream, $query); $readin_list = sqimap_read_data_list($imap_stream, $sid, true, $response, $message); @@ -157,6 +157,8 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $issent) { $date = ""; $type[0] = ""; $type[1] = ""; + $ref = ""; + $inreplyto = ""; $read = $read_list[$msgi]; foreach ($read as $read_part) { @@ -186,6 +188,10 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $issent) { if (!isset($type[1])) { $type[1] = ''; } + } else if (eregi ("^references:(.*)$", $read_part, $regs)) { + $ref = $regs[1]; + } else if (eregi ("^in-reply-to:(.*)$", $read_part, $regs)) { + $inreplyto = $regs[1]; } } $internaldate = getPref($data_dir, $username, 'internal_date_sort'); @@ -217,6 +223,8 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list, $issent) { $header->size = $size; $header->type0 = $type[0]; $header->type1 = $type[1]; + $header->references = $ref; + $header->inreplyto = $inreplyto; $result[] = $header; } -- 2.25.1