From 745b1466fc76d5ded589e2469328086002430c1c Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 22 Feb 2006 16:58:00 -0500
Subject: [PATCH] Updated localizations

---
 program/lib/imap.inc |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 48b2cd1..2850222 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -36,7 +36,9 @@
 		- Parse charset from content-type in iil_C_FetchHeaders()
 		- Enhanced heaer sorting
 		- Pass message as reference in iil_C_Append (to save memory)
-		- Added BCC to the list of headers to fetch in iil_C_FetchHeaders()
+		- Added BCC and REFERENCE to the list of headers to fetch in iil_C_FetchHeaders()
+		- Leave messageID unchanged in iil_C_FetchHeaders()
+		- Avoid stripslahes in iil_Connect()
 		- Removed some debuggers (echo ...)
 
 ********************************************************/
@@ -303,8 +305,8 @@
 	$iil_errornum = 0;
 	
 	//strip slashes
-	$user = stripslashes($user);
-	$password = stripslashes($password);
+	// $user = stripslashes($user);
+	// $password = stripslashes($password);
 	
 	//set auth method
 	$auth_method = "plain";
@@ -1208,7 +1210,7 @@
 
 	/* FETCH date,from,subject headers */
 	$key="fh".($c++);
-	$request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID)])\r\n";
+	$request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID REFERENCE)])\r\n";
 
 	if (!fputs($fp, $request)) return false;
 	do{
@@ -1263,6 +1265,7 @@
 			$result[$id]->encoding = str_replace("\n", " ", $headers["content-transfer-encoding"]);
 			$result[$id]->ctype = str_replace("\n", " ", $headers["content-type"]);
 			$result[$id]->in_reply_to = ereg_replace("[\n<>]",'', $headers['in-reply-to']);
+			$result[$id]->reference = $headers["reference"];
 			
 			list($result[$id]->ctype, $ctype_add) = explode(";", $headers["content-type"]);
 
@@ -1270,8 +1273,7 @@
 				$result[$id]->charset = $regs[1];
 
 			$messageID = $headers["message-id"];
-			if ($messageID) $messageID = substr(substr($messageID, 1), 0, strlen($messageID)-2);
-			else $messageID = "mid:".$id;
+			if (!$messageID) "mid:".$id;
 			$result[$id]->messageID = $messageID;
 			}
             else {

--
Gitblit v1.9.1