]> git.pld-linux.org Git - packages/dokuwiki.git/commitdiff
- add mail threading headers for notify emails
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 20 Nov 2008 14:15:49 +0000 (14:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-mailthreads.patch -> 1.1

dokuwiki-mailthreads.patch [new file with mode: 0644]

diff --git a/dokuwiki-mailthreads.patch b/dokuwiki-mailthreads.patch
new file mode 100644 (file)
index 0000000..e124fb7
--- /dev/null
@@ -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);
+ }
+ /**
This page took 0.127196 seconds and 4 git commands to generate.