]> git.pld-linux.org Git - packages/dokuwiki.git/blob - dokuwiki-mailthreads.patch
- export to pdf also for dw2pdf plugin
[packages/dokuwiki.git] / dokuwiki-mailthreads.patch
1 --- dokuwiki-20110329/inc/common.php~   2011-03-29 09:15:04.000000000 +0300
2 +++ dokuwiki-20110329/inc/common.php    2011-03-29 09:16:58.468168676 +0300
3 @@ -1190,7 +1190,21 @@
4      }else{
5          $subject = '['.$conf['mailprefix'].'] '.$subject;
6      }
7 -    mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc);
8 +
9 +    $headers = array();
10 +    // add mail headers to identify page changes in same mail thread
11 +    $file = wikiFN($id);
12 +    $cur = @filemtime($file);
13 +    $headers['Message-Id'] = "$id?rev=$cur";
14 +    if ($rev) {
15 +        $headers['In-Reply-To'] = "$id?rev=$rev";
16 +    }
17 +    $h = '';
18 +    foreach ($headers as $k => $v) {
19 +        $h .= sprintf("%s: %s%s", $k, $v, MAILHEADER_EOL);
20 +    }
21 +
22 +    mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc,$h);
23  }
24  
25  /**
This page took 0.035034 seconds and 3 git commands to generate.