SOURCES: dokuwiki-mailthreads.patch (NEW) - add mail threading headers for ...

glen glen at pld-linux.org
Thu Nov 20 15:15:55 CET 2008


Author: glen                         Date: Thu Nov 20 14:15:54 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add mail threading headers for notify emails

---- Files affected:
SOURCES:
   dokuwiki-mailthreads.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/dokuwiki-mailthreads.patch
diff -u /dev/null SOURCES/dokuwiki-mailthreads.patch:1.1
--- /dev/null	Thu Nov 20 15:15:55 2008
+++ SOURCES/dokuwiki-mailthreads.patch	Thu Nov 20 15:15:49 2008
@@ -0,0 +1,24 @@
+--- dokuwiki-2008-05-05/inc/common.php~	2008-11-20 16:13:06.616720562 +0200
++++ dokuwiki-2008-05-05/inc/common.php	2008-11-20 16:12:51.042753759 +0200
+@@ -1009,7 +1009,20 @@
+   $from = str_replace('@NAME@',$INFO['userinfo']['name'],$from);
+   $from = str_replace('@MAIL@',$INFO['userinfo']['mail'],$from);
+ 
+-  mail_send($to,$subject,$text,$from,'',$bcc);
++  $headers = array();
++  // add mail headers to identify page changes in same mail thread
++  $file = wikiFN($id);
++  $cur = @filemtime($file);
++  $headers['Message-Id'] = "$id?rev=$cur";
++  if ($rev) {
++      $headers['In-Reply-To'] = "$id?rev=$rev";
++  }
++  $h = '';
++  foreach ($headers as $k => $v) {
++      $h .= sprintf("%s: %s%s", $k, $v, MAILHEADER_EOL);
++  }
++
++  mail_send($to,$subject,$text,$from,'' ,$bcc, $h);
+ }
+ 
+ /**
================================================================


More information about the pld-cvs-commit mailing list