]> git.pld-linux.org Git - packages/dokuwiki.git/blobdiff - dokuwiki-mailthreads.patch
typo (do expand variable)
[packages/dokuwiki.git] / dokuwiki-mailthreads.patch
index 0a6308302b8212f9384cd5db7e07c49ae2f30db3..ceb5ad6220f9b15f2deae37c8fd0f2875429b901 100644 (file)
@@ -1,24 +1,51 @@
---- dokuwiki-2010-11-07/inc/common.php~        2010-11-07 22:38:45.000000000 +0200
-+++ dokuwiki-2010-11-07/inc/common.php 2010-11-07 22:41:54.567137751 +0200
-@@ -1163,7 +1163,20 @@
-         $subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject;
+--- dokuwiki-2012-07-16/inc/common.php 2012-07-16 00:20:31.431313996 +0300
++++ dokuwiki-2012-07-19/inc/common.php 2012-07-19 19:13:50.094210050 +0300
+@@ -1215,2 +1215,18 @@
      }
--    mail_send($to,$subject,$text,$conf['mailfrom'],'',$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);
++    if ($conf['mailthreads'] && $who != 'register') {
++        $file = wikiFN($id);
++        $cur = @filemtime($file);
++
++        $server = parse_url(DOKU_URL, PHP_URL_HOST);
++        $listid = join('.', array_reverse(explode('/', DOKU_BASE))).$server;
++        $listid = strtolower(trim($listid, '.'));
++
++        $mail->setHeader('Message-Id', "$id?rev=$cur@$listid", false);
++        if ($rev) {
++            $mail->setHeader('In-Reply-To', "$id?rev=$rev@$listid", false);
++        }
 +    }
 +
-+    mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc,$h);
- }
+     return $mail->send();
+--- dokuwiki/conf/dokuwiki.php~        2012-07-19 09:02:02.000000000 +0300
++++ dokuwiki/conf/dokuwiki.php 2012-07-19 19:12:53.031815276 +0300
+@@ -113,6 +113,7 @@
+ $conf['mailfrom']    = '';               //use this email when sending mails
+ $conf['mailprefix']  = '';               //use this as prefix of outgoing mails
+ $conf['htmlmail']    = 1;                //send HTML multipart mails
++$conf['mailthreads'] = 1;                //add threading headers to page change notification mails
+ /* Syndication Settings */
+ $conf['sitemap']     = 0;                //Create a google sitemap? How often? In days.
+--- dokuwiki/lib/plugins/config/settings/config.metadata.php~  2012-07-15 23:56:17.000000000 +0300
++++ dokuwiki/lib/plugins/config/settings/config.metadata.php   2012-07-19 19:15:54.789443307 +0300
+@@ -178,6 +178,7 @@
+ $meta['mailfrom']       = array('richemail');
+ $meta['mailprefix']     = array('string');
+ $meta['htmlmail']       = array('onoff');
++$meta['mailthreads']    = array('onoff');
+ $meta['_syndication'] = array('fieldset');
+ $meta['sitemap']     = array('numeric');
+--- dokuwiki/lib/plugins/config/lang/en/lang.php~      2012-07-19 19:17:16.000000000 +0300
++++ dokuwiki/lib/plugins/config/lang/en/lang.php       2012-07-19 19:17:19.673005805 +0300
+@@ -148,6 +148,7 @@
+ $lang['mailfrom']    = 'Sender email address to use for automatic mails';
+ $lang['mailprefix']  = 'Email subject prefix to use for automatic mails. Leave blank to use the wiki title';
+ $lang['htmlmail']    = 'Send better looking, but larger in size HTML multipart emails. Disable for plain text only mails.';
++$conf['mailthreads'] = 'Add threading headers to page change notification mails';
  
- /**
+ /* Syndication Settings */
+ $lang['sitemap']     = 'Generate Google sitemap this often (in days). 0 to disable';
This page took 0.032305 seconds and 4 git commands to generate.