[packages/dokuwiki] update to 2012-07-19 snap, updated patches regarding mailer class

glen glen at pld-linux.org
Thu Jul 19 07:49:53 CEST 2012


commit 4e1fe290e9edfecb1bdc2309b215f4e0e407c1b9
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jul 19 08:49:48 2012 +0300

    update to 2012-07-19 snap, updated patches regarding mailer class

 dokuwiki-mailthreads.patch | 23 ++++++-----------
 dokuwiki.spec              | 10 ++++----
 task-1821.patch            | 62 ++++++++++++++++++++++++----------------------
 3 files changed, 45 insertions(+), 50 deletions(-)
---
diff --git a/dokuwiki-mailthreads.patch b/dokuwiki-mailthreads.patch
index 893b468..9bfe1c3 100644
--- a/dokuwiki-mailthreads.patch
+++ b/dokuwiki-mailthreads.patch
@@ -1,25 +1,18 @@
---- dokuwiki-20110329/inc/common.php~	2011-03-29 09:15:04.000000000 +0300
-+++ dokuwiki-20110329/inc/common.php	2011-03-29 09:16:58.468168676 +0300
-@@ -1190,7 +1190,21 @@
-     }else{
-         $subject = '['.$conf['mailprefix'].'] '.$subject;
+--- 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
+         );
      }
--    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";
++    $mail->setHeader('Message-Id', "$id?rev=$cur", false);
 +    if ($rev) {
-+        $headers['In-Reply-To'] = "$id?rev=$rev";
-+    }
-+    $h = '';
-+    foreach ($headers as $k => $v) {
-+        $h .= sprintf("%s: %s%s", $k, $v, MAILHEADER_EOL);
++        $mail->setHeader('In-Reply-To', "$id?rev=$rev", false);
 +    }
 +
-+    mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc,$h);
+     return $mail->send();
  }
  
- /**
diff --git a/dokuwiki.spec b/dokuwiki.spec
index 5aba072..80706d6 100644
--- a/dokuwiki.spec
+++ b/dokuwiki.spec
@@ -1,4 +1,4 @@
-%define		subver	2012-07-13
+%define		subver	2012-07-19
 %define		ver		%(echo %{subver} | tr -d -)
 %define		snap	1
 %define		php_min_version 5.2.4
@@ -7,12 +7,12 @@ Summary:	PHP-based Wiki webapplication
 Summary(pl.UTF-8):	Aplikacja WWW Wiki oparta na PHP
 Name:		dokuwiki
 Version:	%{ver}
-Release:	0.1
+Release:	0.5
 License:	GPL v2
 Group:		Applications/WWW
 #Source0:	http://www.splitbrain.org/_media/projects/dokuwiki/%{name}-%{subver}.tgz
 Source0:	http://github.com/splitbrain/dokuwiki/tarball/master/%{name}-%{subver}.tgz
-# Source0-md5:	21bb0371b5625789e8c1cf3e5052e291
+# Source0-md5:	81b5f839ae2c3ac8f664ebf87d29638a
 Source1:	%{name}-apache.conf
 Source2:	%{name}-lighttpd.conf
 Source3:	http://glen.alkohol.ee/pld/jude.png
@@ -137,13 +137,13 @@ touch data/pages/playground/playground.txt
 %patch8 -p1
 %patch10 -p1
 %patch11 -p1
-#%patch12 -p1 UPDATE to new mailer class
+%patch12 -p1
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
 %patch19 -p1
 %patch20 -p1
-#%patch21 -p1 UPDATE to new mailer class
+%patch21 -p1
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
diff --git a/task-1821.patch b/task-1821.patch
index 8e33b93..b224f88 100644
--- a/task-1821.patch
+++ b/task-1821.patch
@@ -1,18 +1,20 @@
---- dokuwiki/inc/html.php~	2010-01-11 14:35:04.000000000 +0200
-+++ dokuwiki/inc/html.php	2010-01-11 14:35:07.213389784 +0200
-@@ -862,8 +862,12 @@
+--- dokuwiki-2012-07-16/inc/html.php~	2012-07-16 11:47:58.000000000 +0300
++++ dokuwiki-2012-07-16/inc/html.php	2012-07-16 11:53:24.640163788 +0300
+@@ -1086,9 +1086,13 @@
      // given as rev and rev2 parameters, with rev2 being optional. Or in an
      // array in rev2.
      $rev1 = $REV;
-+	// handle $r1 + $r2, see DW #1821
-+	if (isset($_REQUEST['r1']) && isset($_REQUEST['r2'])) {
-+        $rev1 = (int) $_REQUEST['r1'];
-+        $rev2 = (int) $_REQUEST['r2'];
- 
--    if(is_array($_REQUEST['rev2'])){
-+	} else if(is_array($_REQUEST['rev2'])){
-         $rev1 = (int) $_REQUEST['rev2'][0];
-         $rev2 = (int) $_REQUEST['rev2'][1];
+-
+     $rev2 = $INPUT->ref('rev2');
+-    if(is_array($rev2)){
++
++    // handle $r1 + $r2, see DW #1821
++    if ($INPUT->has('r1') && $INPUT->has('r2')) {
++        $rev1 = $INPUT->int('r1');
++        $rev2 = $INPUT->int('r2');
++    } elseif(is_array($rev2)){
+         $rev1 = (int) $rev2[0];
+         $rev2 = (int) $rev2[1];
  
 --- dokuwiki-20110329/inc/html.php~	2011-03-29 09:20:42.000000000 +0300
 +++ dokuwiki-20110329/inc/html.php	2011-03-29 09:21:51.507042136 +0300
@@ -27,22 +29,22 @@
                          'difftype' => $type,
                        ));
          ptln('<br /><a class="wikilink1" href="'.$diffurl.'">'.$lang['difflink'].'</a>');
---- dokuwiki-rc2010-10-07/inc/common.php~	2010-10-07 21:41:20.000000000 +0300
-+++ dokuwiki-rc2010-10-07/inc/common.php	2010-10-07 21:45:00.639114275 +0300
-@@ -1147,6 +1147,8 @@
-     }elseif($rev){
-         $subject = $lang['mail_changed'].' '.$id;
-         $text = str_replace('@OLDPAGE@',wl($id,"rev=$rev",true,'&'),$text);
-+        $rev2 = $INFO['meta']['date']['modified'];
-+        $text = str_replace('@DIFFPAGE@',wl($id,"do=diff&r1=$rev&r2=$rev2",true,'&'),$text);
-         $df  = new Diff(explode("\n",rawWiki($id,$rev)),
-                         explode("\n",rawWiki($id)));
-         $dformat = new UnifiedDiffFormatter();
-@@ -1154,6 +1156,7 @@
-     }else{
-         $subject=$lang['mail_newpage'].' '.$id;
-         $text = str_replace('@OLDPAGE@','none',$text);
-+        $text = str_replace('@DIFFPAGE@','none',$text);
-         $diff = rawWiki($id);
+--- dokuwiki-2012-07-16/inc/common.php~	2012-07-16 11:55:03.000000000 +0300
++++ dokuwiki-2012-07-16/inc/common.php	2012-07-16 11:58:26.626127713 +0300
+@@ -1178,6 +1178,8 @@
+     } elseif($rev) {
+         $subject         = $lang['mail_changed'].' '.$id;
+         $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
++        $rev2            = $INFO['meta']['date']['modified'];
++        $trep['DIFFPAGE']= wl($id,"do=diff&r1=$rev&r2=$rev2",true,'&');
+         $df              = new Diff(explode("\n", rawWiki($id, $rev)),
+                                     explode("\n", rawWiki($id)));
+         $dformat         = new UnifiedDiffFormatter();
+@@ -1191,6 +1193,7 @@
+     } else {
+         $subject         = $lang['mail_newpage'].' '.$id;
+         $trep['OLDPAGE'] = '---';
++        $trep['DIFFPAGE']= '---';
+         $tdiff           = rawWiki($id);
+         $hdiff           = nl2br(hsc($tdiff));
      }
-     $text = str_replace('@DIFF@',$diff,$text);


More information about the pld-cvs-commit mailing list