]> git.pld-linux.org Git - packages/dokuwiki.git/blob - dokuwiki-mailthreads.patch
0a6308302b8212f9384cd5db7e07c49ae2f30db3
[packages/dokuwiki.git] / dokuwiki-mailthreads.patch
1 --- dokuwiki-2010-11-07/inc/common.php~ 2010-11-07 22:38:45.000000000 +0200
2 +++ dokuwiki-2010-11-07/inc/common.php  2010-11-07 22:41:54.567137751 +0200
3 @@ -1163,7 +1163,20 @@
4          $subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject;
5      }
6  
7 -    mail_send($to,$subject,$text,$conf['mailfrom'],'',$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,$conf['mailfrom'],'',$bcc,$h);
22  }
23  
24  /**
This page took 0.022283 seconds and 2 git commands to generate.