Summary(pl.UTF-8): Wtyczka Page Redirect (przekierowywania stron) dla DokuWiki
Name: dokuwiki-plugin-%{plugin}
Version: 2
-Release: 2
+Release: 3
License: GPL v2
Group: Applications/WWW
Source0: http://wiki.zyberdog.dk/_media/php/dw/pageredirect/pageredirect_current.zip
Source1: dokuwiki-find-lang.sh
Patch0: %{name}-pagematch.patch
Patch1: mute-warning.patch
+Patch2: preserve-section.patch
URL: http://www.dokuwiki.org/plugin:page_redirector
BuildRequires: unzip
Requires: dokuwiki >= 20061106
%setup -q -n %{plugin}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%install
rm -rf $RPM_BUILD_ROOT
--- /dev/null
+--- pageredirect/action.php 2012-06-04 15:32:26.364418325 +0300
++++ pageredirect/action.php 2012-06-04 15:32:49.548728621 +0300
+@@ -63,9 +63,17 @@
+ session_start();
+ $_SESSION[DOKU_COOKIE]['redirect'] = $ID;
+ }
+-
++
++ // preserve #section from $page
++ list($page, $section) = explode('#', $page, 2);
++ if (isset($section)) {
++ $section = '#' . $section;
++ } else {
++ $section = '';
++ }
++
+ // redirect
+- header("Location: ".wl($page, Array('redirect' => $redirect), TRUE, '&'));
++ header("Location: ".wl($page, Array('redirect' => $redirect), TRUE, '&'). $section);
+ exit();
+ }
+ }