[Svn] r3316 - in trunk/roundcubemail: . program/lib program/steps/mail

trac at roundcube.net trac at roundcube.net
Thu Mar 4 09:17:04 CET 2010


Author: thomasb
Date: 2010-03-04 02:17:04 -0600 (Thu, 04 Mar 2010)
New Revision: 3316

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/lib/imap.inc
   trunk/roundcubemail/program/steps/mail/compose.inc
   trunk/roundcubemail/program/steps/mail/sendmail.inc
Log:
Flag original messages after sending a draft (#1486203)

Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2010-03-04 07:39:53 UTC (rev 3315)
+++ trunk/roundcubemail/CHANGELOG	2010-03-04 08:17:04 UTC (rev 3316)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Flag original messages when sending a draft (#1486203)
 - Changed signature separator when top-posting (#1486330)
 - Let the admin define defaults for search modifiers (#1485897)
 - Fix long e-mail addresses validation (#1486453)

Modified: trunk/roundcubemail/program/lib/imap.inc
===================================================================
--- trunk/roundcubemail/program/lib/imap.inc	2010-03-04 07:39:53 UTC (rev 3315)
+++ trunk/roundcubemail/program/lib/imap.inc	2010-03-04 08:17:04 UTC (rev 3316)
@@ -1450,7 +1450,8 @@
 	$request .= "BODY.PEEK[HEADER.FIELDS ";
 	$request .= "(DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC ";
 	$request .= "CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID ";
-	$request .= "REFERENCES DISPOSITION-NOTIFICATION-TO X-PRIORITY".$add.")])";
+	$request .= "REFERENCES DISPOSITION-NOTIFICATION-TO X-PRIORITY ";
+	$request .= "X-REPLY-UID X-FORWARD-UID".$add.")])";
 
 	if (!iil_PutLine($fp, $request)) {
 		return false;

Modified: trunk/roundcubemail/program/steps/mail/compose.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/compose.inc	2010-03-04 07:39:53 UTC (rev 3315)
+++ trunk/roundcubemail/program/steps/mail/compose.inc	2010-03-04 08:17:04 UTC (rev 3316)
@@ -158,9 +158,9 @@
   {
     if($MESSAGE->headers->in_reply_to)
     {
-      // TODO: how to get reply_uid/forward_uid value, maybe we must set X-Reply-UID/X-Forward-UID
-      // $_SESSION['compose']['reply_uid'] = ?
-      // $_SESSION['compose']['forward_uid'] = ?
+      // get reply_uid/forward_uid to flag the original message when sending
+      $_SESSION['compose']['reply_uid'] = $MESSAGE->headers->others['x-reply-uid'];
+      $_SESSION['compose']['forward_uid'] = $MESSAGE->headers->others['x-forward-uid'];
       $_SESSION['compose']['reply_msgid'] = '<'.$MESSAGE->headers->in_reply_to.'>';
     }
     $_SESSION['compose']['references']  = $MESSAGE->headers->references;

Modified: trunk/roundcubemail/program/steps/mail/sendmail.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/sendmail.inc	2010-03-04 07:39:53 UTC (rev 3315)
+++ trunk/roundcubemail/program/steps/mail/sendmail.inc	2010-03-04 08:17:04 UTC (rev 3316)
@@ -314,6 +314,12 @@
 if (!empty($_SESSION['compose']['reply_msgid']))
   $headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid'];
 
+// remember reply/forward UIDs in special headers
+if (!empty($_SESSION['compose']['reply_uid']) && $savedraft)
+  $headers['X-Reply-UID'] = $_SESSION['compose']['reply_uid'];
+else if (!empty($_SESSION['compose']['forward_uid']) && $savedraft)
+  $headers['X-Forward-UID'] = $_SESSION['compose']['forward_uid'];
+
 if (!empty($_SESSION['compose']['references']))
   $headers['References'] = $_SESSION['compose']['references'];
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list