]> git.pld-linux.org Git - packages/dokuwiki-plugin-data.git/commitdiff
- fix for removing pages in root namespace
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 10 Aug 2009 16:19:05 +0000 (16:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-plugin-data.spec -> 1.8
    remove-rootns.patch -> 1.1

dokuwiki-plugin-data.spec
remove-rootns.patch [new file with mode: 0644]

index 38503115aed0934662eeac2dca8f33375d95d930..890294fc1f14c9c46bdb9d41e0f5b05031bf67b7 100644 (file)
@@ -2,13 +2,14 @@
 Summary:       DokuWiki Structured Data Plugin
 Name:          dokuwiki-plugin-%{plugin}
 Version:       20090213
-Release:       3
+Release:       4
 License:       GPL v2
 Group:         Applications/WWW
 Source0:       http://dev.splitbrain.org/download/snapshots/data-plugin-latest.tgz
 # Source0-md5: 6a3ee212496a60a343b62246e8002957
 URL:           http://wiki.splitbrain.org/plugin:data
 Patch0:                interwiki.patch
+Patch1:                remove-rootns.patch
 BuildRequires: rpmbuild(macros) >= 1.520
 Requires:      dokuwiki >= 20090214b-5
 Requires:      php(sqlite)
@@ -31,6 +32,7 @@ different to the repository plugin.
 %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
diff --git a/remove-rootns.patch b/remove-rootns.patch
new file mode 100644 (file)
index 0000000..43a0a18
--- /dev/null
@@ -0,0 +1,30 @@
+--- data/action.php    2009-02-06 22:40:42.000000000 +0200
++++ tmp/action.php    2009-08-10 19:17:12.000000000 +0300
+@@ -43,10 +43,19 @@
+      */
+     function _handle(&$event, $param){
+         $data = $event->data;
+-        if(strpos($data[0][1],'dataentry') !== false) return; // plugin seems still to be there
++        if (strpos($data[0][1],'dataentry') !== false) {
++            return; // plugin seems still to be there
++        }
+-        if(!$this->dthlp->_dbconnect()) return;
+-        $id = $data[1].":".$data[2];
++        if (!$this->dthlp->_dbconnect()) {
++            return;
++        }
++        // for root the namespace is empty
++        if (!empty($data[1])) {
++            $id = $data[1].":".$data[2];
++        } else {
++            $id = $data[2];
++        }
+         // get page id
+         $sql = "SELECT pid FROM pages WHERE page ='".sqlite_escape_string($id)."'";
+@@ -61,4 +70,3 @@
+         sqlite_query($this->dthlp->db, $sql);
+     }
+ }
+-
This page took 0.272727 seconds and 4 git commands to generate.