]> git.pld-linux.org Git - packages/dokuwiki.git/commitdiff
make the choice configurable
authorElan Ruusamäe <glen@delfi.ee>
Thu, 19 Jul 2012 16:18:14 +0000 (19:18 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 19 Jul 2012 16:18:14 +0000 (19:18 +0300)
also add domain to message-id header

dokuwiki-mailthreads.patch

index 9bfe1c3e7164f0b2752f4be88639038da674c784..f3d651fc0528fd0b42c81133628aeedfe77628a8 100644 (file)
@@ -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@listid", false);
++        if ($rev) {
++            $mail->setHeader('In-Reply-To', "$id?rev=$rev@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';
This page took 0.218565 seconds and 4 git commands to generate.