[packages/dokuwiki-plugin-data] Up to 2026-07-03

arekm arekm at pld-linux.org
Wed Oct 21 12:15:41 CEST 2026


commit 4c57c7384d59548550dc6e8412568733445c1ee4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Oct 21 12:14:49 2026 +0200

    Up to 2026-07-03

 cache-enable.patch        | 18 +++++-----
 dokuwiki-plugin-data.spec | 17 +++++----
 separate-rpmdb.patch      | 91 +++++++++++++++--------------------------------
 separator-style.patch     | 10 +++---
 4 files changed, 50 insertions(+), 86 deletions(-)
---
diff --git a/dokuwiki-plugin-data.spec b/dokuwiki-plugin-data.spec
index 88f3353..6ca8995 100644
--- a/dokuwiki-plugin-data.spec
+++ b/dokuwiki-plugin-data.spec
@@ -1,15 +1,15 @@
-%define		subver	2022-07-27
+%define		subver	2026-07-03
 %define		ver		%(echo %{subver} | tr -d -)
 %define		plugin		data
-%define		php_min_version 5.6.0
+%define		php_min_version 7.3.0
 Summary:	DokuWiki Structured Data Plugin
 Name:		dokuwiki-plugin-%{plugin}
 Version:	%{ver}
-Release:	2
+Release:	1
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	https://github.com/splitbrain/dokuwiki-plugin-%{plugin}/archive/%{subver}/%{plugin}-%{subver}.tar.gz
-# Source0-md5:	2a03d1428b83dd279132b8d5772e6e9d
+# Source0-md5:	c35f3a13574f058eec5be3854e590590
 URL:		https://www.dokuwiki.org/plugin:data
 Patch2:		separator-style.patch
 Patch3:		separate-rpmdb.patch
@@ -47,14 +47,13 @@ different to the repository plugin.
 
 %prep
 %setup -qc
-mv *-%{plugin}-*/{.??*,*} .
+mv *-%{plugin}-*/* .
 %patch -P2 -p1
 %patch -P3 -p1
 %patch -P4 -p1
 
 # nothing to do with tests
-rm -rf _test
-rm .travis.yml
+rm requirements.txt
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -70,7 +69,7 @@ fi
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{plugindir},%{metadir}}
 cp -a . $RPM_BUILD_ROOT%{plugindir}
-%{__rm} $RPM_BUILD_ROOT%{plugindir}/README
+%{__rm} $RPM_BUILD_ROOT%{plugindir}/{LICENSE,README}
 # sqlite2: php-sqlite
 touch $RPM_BUILD_ROOT%{metadir}/data.sqlite
 # sqlite3: php-pdo-sqlite
@@ -90,7 +89,7 @@ fi
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc README
+%doc README LICENSE
 %dir %{plugindir}
 %{plugindir}/*.css
 %{plugindir}/*.js
diff --git a/cache-enable.patch b/cache-enable.patch
index 0c3c191..c547214 100644
--- a/cache-enable.patch
+++ b/cache-enable.patch
@@ -1,14 +1,14 @@
---- dokuwiki-plugin-data-20160311/syntax/table.php~	2016-11-22 23:08:27.000000000 +0200
-+++ dokuwiki-plugin-data-20160311/syntax/table.php	2016-11-22 23:08:54.437219264 +0200
-@@ -245,7 +245,10 @@
-         $sqlite = $this->dthlp->_getDB();
-         if(!$sqlite) return false;
+--- a/syntax/table.php	2026-07-04 01:56:21.000000000 +0200
++++ b/syntax/table.php	2026-10-21 00:09:20.472972374 +0200
+@@ -253,7 +253,10 @@
+         $sqlite = $this->dthlp->getDB();
+         if (!$sqlite) return false;
  
--        $R->info['cache'] = false;
+-        $renderer->info['cache'] = false;
 +        // disable cache only if sorting having some filters
-+        if ($data['dynfilters'] || !empty($_REQUEST['datasrt']) || !empty($_GET['dataflt']) || !empty($_REQUEST['dataofs'])) {
-+            $R->info['cache'] = false;
++        if ($data['dynfilters'] || $this->hasRequestFilter() || isset($_REQUEST['dataofs'])) {
++            $renderer->info['cache'] = false;
 +        }
  
          //reset counters
-         $this->sums = array();
+         $this->sums = [];
diff --git a/separate-rpmdb.patch b/separate-rpmdb.patch
index 7a4e71e..3ffc62e 100644
--- a/separate-rpmdb.patch
+++ b/separate-rpmdb.patch
@@ -1,70 +1,35 @@
-Separate rpmdb data to rpmdb table, left join via %rpm% field name on demand.
-
-As the rpmdb data is huge comparing to other data, it's best we keep it
-in separate table, if it is still a performance problem, we could use
-separate datafile.
-
-You need to create 'rpm' table manually:
-CREATE TABLE rpmdb (eid INTEGER PRIMARY KEY, pid INTEGER, value);
-
-Handling it automatically would mean have to renumber upstream patches each
-time...
-
---- dokuwiki-plugin-data-20160311/helper.php~	2016-11-22 23:06:06.000000000 +0200
-+++ dokuwiki-plugin-data-20160311/helper.php	2016-11-22 23:06:44.267324645 +0200
-@@ -385,6 +385,7 @@
-             '%title%'   => array('page', 'title'),
-             '%pageid%'  => array('title', 'page'),
-             '%class%'   => array('class'),
-+            '%rpm%'     => array('rpm'),
-             '%lastmod%' => array('lastmod', 'timestamp')
-         );
-         if(isset($specials[$column['title']])) {
---- dokuwiki-plugin-data-20120227/lang/en/lang.php~	2012-02-27 16:32:51.000000000 +0200
-+++ dokuwiki-plugin-data-20120227/lang/en/lang.php	2012-03-13 13:12:04.190745746 +0200
+--- a/helper.php	2026-07-04 01:56:21.000000000 +0200
++++ b/helper.php	2026-10-21 00:09:20.501966896 +0200
+@@ -415,6 +415,7 @@
+             '%title%' => ['page', 'title'],
+             '%pageid%' => ['title', 'page'],
+             '%class%' => ['class'],
++            '%rpm%' => ['rpm'],
+             '%lastmod%' => ['lastmod', 'timestamp']
+         ];
+         if (isset($specials[$column['title']])) {
+--- a/lang/en/lang.php	2026-07-04 01:56:21.000000000 +0200
++++ b/lang/en/lang.php	2026-10-21 00:09:20.502259505 +0200
 @@ -16,6 +16,7 @@
- $lang['page']      = 'Page';
- $lang['title']     = 'Page Name';
- $lang['class']     = 'Page Class';
-+$lang['rpm']       = 'RPM Package';
- $lang['lastmod']   = 'Last Modified';
+ $lang['page'] = 'Page';
+ $lang['title'] = 'Page Name';
+ $lang['class'] = 'Page Class';
++$lang['rpm'] = 'RPM Package';
+ $lang['lastmod'] = 'Last Modified';
  
- $lang['name']      = 'Type Alias';
---- dokuwiki-plugin-data-20160311/syntax/table.php	2016-11-22 23:08:01.967907897 +0200
-+++ dokuwiki-plugin-data-20220727/syntax/table.php	2023-04-25 15:27:50.645943694 +0300
-@@ -584,6 +584,13 @@
+ $lang['name'] = 'Type Alias';
+--- a/syntax/table.php	2026-07-04 01:56:21.000000000 +0200
++++ b/syntax/table.php	2026-10-21 00:09:20.502616348 +0200
+@@ -599,6 +599,12 @@
                  $select[] = 'pages.lastmod';
-             } elseif($key == '%title%') {
+             } elseif ($key == '%title%') {
                  $select[] = "pages.page || '|' || pages.title";
-+            } elseif($key == '%rpm%'){
-+                if(!isset($tables[$key])){
-+                    $tables[$key] = 'T'.(++$cnt);
-+                    $from  .= ' LEFT JOIN rpmdb AS '.$tables[$key].' ON '.$tables[$key].'.pid = pages.pid';
++            } elseif ($key == '%rpm%') {
++                if (!isset($tables[$key])) {
++                    $tables[$key] = 'T' . (++$cnt);
++                    $from .= ' LEFT JOIN rpmdb AS ' . $tables[$key] . ' ON ' . $tables[$key] . '.pid = W1.pid';
 +                }
-+                $select[] = "group_concat(".$tables[$key].".value,'\n')";
-+
++                $select[] = "group_concat(" . $tables[$key] . ".value,'\n')";
              } else {
-                 if(!isset($tables[$key])) {
+                 if (!isset($tables[$key])) {
                      $tables[$key] = 'T' . (++$cnt);
-@@ -686,6 +693,21 @@
-                 GROUP BY W1.pid
-                 $order";
- 
-+        // Re-order LEFT JOIN pages before LEFT JOIN rpm
-+        $sql = preg_replace_callback('/
-+            (?P<before>.+)
-+            (?P<rpmdb>LEFT\sJOIN\srpmdb\sAS\sT\d+\sON\sT\d+.pid\s=\spages.pid\s+)
-+            (?P<pages>LEFT\sJOIN\spages\sON\sW\d+\.pid\s*=pages\.pid\s+)
-+            (?P<after>.+)
-+        /xm', function ($m) {
-+            return implode("", [
-+                $m['before'],
-+                $m['pages'],
-+                $m['rpmdb'],
-+                $m['after'],
-+            ]);
-+        }, $sql);
-+
-         // offset and limit
-         if($data['limit']) {
-             $sql .= ' LIMIT ' . ($data['limit'] + 1);
diff --git a/separator-style.patch b/separator-style.patch
index 73095f9..0d37385 100644
--- a/separator-style.patch
+++ b/separator-style.patch
@@ -7,14 +7,14 @@ table.dataplugin_table span.sep {
 
 and have list items listed below each other
 
---- dokuwiki-plugin-data-20160311/helper.php~	2016-07-01 14:27:21.000000000 +0300
-+++ dokuwiki-plugin-data-20160311/helper.php	2016-11-22 23:05:37.213943088 +0200
-@@ -360,7 +360,7 @@
+--- a/helper.php	2026-07-04 01:56:21.000000000 +0200
++++ b/helper.php	2026-10-21 00:09:20.445084545 +0200
+@@ -389,7 +389,7 @@
                      }
              }
          }
--        return join(', ', $outs);
-+        return join('<span class="sep">, </span>',$outs);
+-        return implode(', ', $outs);
++        return implode('<span class="sep">, </span>', $outs);
      }
  
      /**
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dokuwiki-plugin-data.git/commitdiff/4c57c7384d59548550dc6e8412568733445c1ee4



More information about the pld-cvs-commit mailing list