[packages/dokuwiki] make the choice configurable

glen glen at pld-linux.org
Thu Jul 19 18:18:36 CEST 2012


commit 81b48df287c85c931897fc6e439c887d24bb381e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jul 19 19:18:14 2012 +0300

    make the choice configurable
    
    also add domain to message-id header

 dokuwiki-mailthreads.patch | 55 ++++++++++++++++++++++++++++++++++++----------
 1 file changed, 44 insertions(+), 11 deletions(-)
---
diff --git a/dokuwiki-mailthreads.patch b/dokuwiki-mailthreads.patch
index 9bfe1c3..f3d651f 100644
--- a/dokuwiki-mailthreads.patch
+++ b/dokuwiki-mailthreads.patch
@@ -1,18 +1,51 @@
---- dokuwiki-2012-07-16/inc/common.php~	2012-07-16 00:15:28.000000000 +0300
-+++ dokuwiki-2012-07-16/inc/common.php	2012-07-16 00:20:31.431313996 +0300
-@@ -1210,6 +1210,15 @@
-             false
-         );
+--- 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 @@
      }
 +
 +    // add mail headers to identify page changes in same mail thread
-+    $file = wikiFN($id);
-+    $cur = @filemtime($file);
-+    $mail->setHeader('Message-Id', "$id?rev=$cur", false);
-+    if ($rev) {
-+        $mail->setHeader('In-Reply-To', "$id?rev=$rev", false);
++    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 at listid", false);
++        if ($rev) {
++            $mail->setHeader('In-Reply-To', "$id?rev=$rev at listid", false);
++        }
 +    }
 +
      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';


More information about the pld-cvs-commit mailing list