]> git.pld-linux.org Git - packages/dokuwiki-plugin-pagemove.git/commitdiff
up to 20130125 snapshot, it's rewrite for pagemove using metadata DEVEL
authorElan Ruusamäe <glen@delfi.ee>
Thu, 31 Jan 2013 23:18:47 +0000 (01:18 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 31 Jan 2013 23:52:23 +0000 (01:52 +0200)
see this forum post:
https://forum.dokuwiki.org/thread/4947,4;nocount

dokuwiki-plugin-pagemove-redirectlinks.patch [deleted file]
dokuwiki-plugin-pagemove-selflinks.patch [deleted file]
dokuwiki-plugin-pagemove.spec

diff --git a/dokuwiki-plugin-pagemove-redirectlinks.patch b/dokuwiki-plugin-pagemove-redirectlinks.patch
deleted file mode 100644 (file)
index 7a74f06..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
---- dokuwiki-plugin-pagemove-20110811/admin.php~       2012-06-12 23:38:07.000000000 +0300
-+++ dokuwiki-plugin-pagemove-20110811/admin.php        2012-06-12 23:47:42.513225196 +0300
-@@ -742,7 +742,8 @@
-      */
-     function _pm_updatelinks(&$text, $links) {
-         foreach( $links as $old => $new ) {
--            $text = preg_replace( '#\[\[:?' . $old . '((\]\])|[\|\#])#i', '[[' . $new . '\1', $text);
-+            $text = preg_replace( '#\[\[:?' . $old . '(\]\]|[\|\#])#i', '[[' . $new . '\1', $text);
-+            $text = preg_replace( '#~~REDIRECT>' . $old . '(~~|[\|\#])#i', '~~REDIRECT>' . $new . '\1', $text);
-         }
-     }
-@@ -772,7 +772,14 @@
-         // match all links
-         // FIXME may be incorrect because of code blocks
-         // TODO CamelCase isn't supported, too
--        preg_match_all('#\[\[(.+?)\]\]#si', $text, $matches, PREG_SET_ORDER);
-+        $matches = array();
-+        if (preg_match_all('#\[\[(.+?)\]\]#s', $text, $m, PREG_SET_ORDER)) {
-+            $matches = array_merge($matches, $m);
-+        }
-+        if (preg_match_all('#~~REDIRECT>(.+?)~~#s', $text, $m, PREG_SET_ORDER)) {
-+            $matches = array_merge($matches, $m);
-+        }
-+
-         foreach($matches as $match) {
-             // ignore local headings [[#some_heading]]
-             if ( preg_match('/^#/', $match[1])) continue;
-@@ -819,7 +819,13 @@
-         // match all links
-         // FIXME may be incorrect because of code blocks
-         // TODO CamelCase isn't supported, too
--        preg_match_all('#{{(.[^>]+?)}}#si', $text, $matches, PREG_SET_ORDER);
-+        $matches = array();
-+        if (preg_match_all('#{{(.[^>]+?)}}#si', $text, $m, PREG_SET_ORDER)) {
-+            $matches = array_merge($matches, $m);
-+        }
-+        if (preg_match_all('#~~REDIRECT>(.+?)~~#s', $text, $m, PREG_SET_ORDER)) {
-+            $matches = array_merge($matches, $m);
-+        }
-         foreach($matches as $match) {
-             // get ID from link and discard most non wikilinks
-             list($mid) = split('(\?|\|)', $match[1], 2);
-@@ -947,7 +947,13 @@
-         // match all links
-         // FIXME may be incorrect because of code blocks
-         // FIXME CamelCase isn't supported, too
--        preg_match_all('#\[\[(.+?)\]\]#si', $text, $matches, PREG_SET_ORDER);
-+        $matches = array();
-+        if (preg_match_all('#\[\[(.+?)\]\]#s', $text, $m, PREG_SET_ORDER)) {
-+            $matches = array_merge($matches, $m);
-+        }
-+        if (preg_match_all('#~~REDIRECT>(.+?)~~#s', $text, $m, PREG_SET_ORDER)) {
-+            $matches = array_merge($matches, $m);
-+        }
-         foreach($matches as $match) {
-             // get ID from link and discard most non wikilinks
-             list($matchLink) = split('[\|#]', $match[1], 2);
diff --git a/dokuwiki-plugin-pagemove-selflinks.patch b/dokuwiki-plugin-pagemove-selflinks.patch
deleted file mode 100644 (file)
index 74b0755..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
---- dokuwiki-plugin-pagemove-20110811/admin.php~       2012-06-12 23:48:17.000000000 +0300
-+++ dokuwiki-plugin-pagemove-20110811/admin.php        2012-06-12 23:50:28.916910665 +0300
-@@ -370,10 +370,10 @@
-             // Set things up to display the new page.
-             io_saveFile($conf['cachedir'].'/purgefile', time());
--            $ID = $opts['new_id'];
--            $ACT = 'show';
--            $INFO = pageinfo();
--            $this->show_form = false;
-+
-+            // redirect to page display
-+            Header("Location: ".wl($opts['new_id']));
-+            exit;
-         }
-         else {
-             $this->errors[] = $this->lang['pm_fatal'];
-@@ -618,14 +618,28 @@
-               saveWikiText($ID, '', $this->lang['pm_delete'] );
-         }
-+        // replace our old id with new one as we already renamed the page but
-+        // there might be backlinks (links to self in this case).
-+        $opts['id'] = cleanID($opts['ns'].':'.$opts['name']);
-+        $selfmod = isset($backlinks[$opts['id']]);
-+        if ($selfmod) {
-+            $backlinks[$opts['new_id']] = $backlinks[$opts['id']];
-+            unset($backlinks[$opts['id']]);
-+        }
-+
-         // Loop through backlinks
-         foreach($backlinksById as $backlinkingId => $backlinks) {
--            $this->_pm_updatebacklinks($backlinkingId, $backlinks, $opts, $brackets);
-+            $this->_pm_updatebacklinks($backlinkingId, $backlinks, $opts);
-         }
-         // Move the old revisions
-         $this->_pm_movemeta('olddir', '/^'.$opts['name'].'\.[0-9]{10}\.txt(\.gz)?$/', $opts);
-+        // remove cache. again if we ourselves were modified (due backlinks)
-+        if ($selfmod) {
-+            $cache = new cache_instructions($opts['new_id'], wikiFN($opts['new_id']));
-+            $cache->removeCache();
-+        }
-     }
-@@ -637,7 +637,7 @@
-      *
-      * @author  Gary Owen <gary@isection.co.uk>
-      */
--    function _pm_updatebacklinks($backlinkingId, $links, $opts, &$brackets) {
-+    function _pm_updatebacklinks($backlinkingId, $links, $opts) {
-         global $ID;
-         // Get namespace of document we are editing
-@@ -730,8 +730,8 @@
-         // Make the changes
-         $this->_pm_updatelinks($text, $oid);
--        // Save backlink and release lock
--        saveWikiText($backlinkingId, $text, sprintf($this->lang['pm_linkchange'], $ID, $opts['new_id']));
-+        // Save backlink and release lock. call the edit minor to avoid mail flood on marge backlinks changes
-+        saveWikiText($backlinkingId, $text, sprintf($this->lang['pm_linkchange'], $ID, $opts['new_id']), 1);
-         unlock($backlinkingId);
-     }
index 0c1b0ec51412958098d74e37fe85017432d4b2a6..70e66f7b0d48db19101fe2c45d5b6819c1f18537 100644 (file)
@@ -2,18 +2,16 @@
 Summary:       DokuWiki PageMove plugin
 Summary(pl.UTF-8):     Wtyczka PageMove dla DokuWiki
 Name:          dokuwiki-plugin-%{plugin}
-Version:       20110811
-Release:       1
+Version:       20130125
+Release:       0.1
 License:       GPL v2
 Group:         Applications/WWW
-Source0:       http://github.com/desolat/DokuWiki-Pagemove-Plugin/tarball/master/%{plugin}-%{version}.tgz
-# Source0-md5: eff88e845739a9052ac9620d8d2a5056
-Patch0:                %{name}-redirectlinks.patch
-Patch1:                %{name}-selflinks.patch
+Source0:       https://github.com/michitux/DokuWiki-Pagemove-Plugin/archive/master.tar.gz?/%{plugin}-%{version}.tgz
+# Source0-md5: 7224d4641568b766299be6a29688d134
 URL:           http://www.dokuwiki.org/plugin:pagemove
 BuildRequires: sed >= 4.0
 BuildRequires: unzip
-Requires:      dokuwiki >= 20060309
+Requires:      dokuwiki >= 20120919
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -43,15 +41,8 @@ W zupełności można:
 
 %prep
 %setup -qc
-mv *-DokuWiki-Pagemove-Plugin-*/* .
-rm -f *-DokuWiki-Pagemove-Plugin-*/.git*
-%undos -f php
-
-%patch0 -p1
-%patch1 -p1
-mv lang/cs/pagemove.txt{.txt,}
-mv lang/es/pagemove.txt{.txt,}
-mv lang/pl/pagemove.txt{.txt,}
+mv DokuWiki-Pagemove-Plugin-*/* .
+%{__rm} DokuWiki-Pagemove-Plugin-*/.git*
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -73,6 +64,7 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{plugindir}
 %{plugindir}/*.php
 %{plugindir}/*.txt
+%{plugindir}/*.js
 %dir %{plugindir}/lang
 %{plugindir}/lang/en
 %lang(cs) %{plugindir}/lang/cs
This page took 0.068908 seconds and 4 git commands to generate.