]> git.pld-linux.org Git - packages/dokuwiki.git/blob - dokuwiki-mailthreads.patch
- up to 2010-10-07 rc1
[packages/dokuwiki.git] / dokuwiki-mailthreads.patch
1 --- dokuwiki-rc2010-10-07/inc/common.php~       2010-10-07 21:34:10.000000000 +0300
2 +++ dokuwiki-rc2010-10-07/inc/common.php        2010-10-07 21:36:02.099167786 +0300
3 @@ -1168,7 +1168,20 @@
4      $from = str_replace('@NAME@',$INFO['userinfo']['name'],$from);
5      $from = str_replace('@MAIL@',$INFO['userinfo']['mail'],$from);
6  
7 -    mail_send($to,$subject,$text,$from,'',$bcc);
8 +    $headers = array();
9 +    // add mail headers to identify page changes in same mail thread
10 +    $file = wikiFN($id);
11 +    $cur = @filemtime($file);
12 +    $headers['Message-Id'] = "$id?rev=$cur";
13 +    if ($rev) {
14 +        $headers['In-Reply-To'] = "$id?rev=$rev";
15 +    }
16 +    $h = '';
17 +    foreach ($headers as $k => $v) {
18 +        $h .= sprintf("%s: %s%s", $k, $v, MAILHEADER_EOL);
19 +    }
20 +
21 +    mail_send($to,$subject,$text,$from,'' ,$bcc, $h);
22  }
23  
24  /**
This page took 0.048574 seconds and 3 git commands to generate.