Summary: DokuWiki Structured Data Plugin
Name: dokuwiki-plugin-%{plugin}
Version: 20090810
-Release: 1
+Release: 2
License: GPL v2
Group: Applications/WWW
Source0: http://dev.splitbrain.org/download/snapshots/data-plugin-latest.tgz
# Source0-md5: f55adb2c5643693fca8b7ef73944f6e4
URL: http://wiki.splitbrain.org/plugin:data
Patch0: interwiki.patch
+Patch1: helper-map.patch
BuildRequires: rpmbuild(macros) >= 1.520
Requires: dokuwiki >= 20090214b-5
Requires: php(sqlite)
%prep
%setup -q -n %{plugin}
%patch0 -p1
+%patch1 -p1
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
--- /dev/null
+--- data/helper.php 2009-10-22 18:50:43.604400412 +0300
++++ data/helper.php 2009-10-22 18:50:41.000000000 +0300
+@@ -109,6 +109,10 @@
+ list($wikiName, $wikiUri) = explode('>', $val, 2);
+ $outs[] = $R->interwikilink($val, NULL, $wikiName, $wikiUri, true);
+ break;
++ case 'map':
++ $url = "http://maps.google.com/maps?q=".$val;
++ $outs[] = '<a href="'.$url.'" class="urlextern" title="Google Map: '.hsc($val).'">'.hsc($val).'</a>';
++ break;
+ case 'mail':
+ list($id,$title) = explode(' ',$val,2);
+ $id = obfuscate(hsc($id));