]> git.pld-linux.org Git - packages/dokuwiki-plugin-data.git/blame - separate-rpmdb.patch
- add separate-rpmdb.patch
[packages/dokuwiki-plugin-data.git] / separate-rpmdb.patch
CommitLineData
ce3f39eb
ER
1Separate rpmdb data to rpmdb table, left join via %rpm% field name on demand.
2
3As the rpmdb data is huge comparing to other data, it's best we keep it
4in separate table, if it is still a performance problem, we could use
5separate datafile.
6
7--- dokuwiki-plugin-data-20100608/db/latest.version 2010-11-03 15:20:30.000000000 +0200
8+++ dokuwiki-plugin-data-20100608/db/latest.version 2010-12-01 19:50:59.214345000 +0200
9@@ -1 +1 @@
10-4
11+5
12--- dokuwiki-plugin-data-20100608/helper.php 2010-12-01 19:51:15.127904142 +0200
13+++ dokuwiki-plugin-data-20100608/helper.php 2010-12-01 19:50:59.217678000 +0200
14@@ -182,7 +182,9 @@
15 // fix title for special columns
16 static $specials = array('%title%' => array('page', 'title'),
17 '%pageid%' => array('title', 'page'),
18- '%class%' => array('class'));
19+ '%class%' => array('class'),
20+ '%rpm%' => array('rpm'),
21+ );
22 if (isset($specials[$column['title']])) {
23 $s = $specials[$column['title']];
24 $column['title'] = $this->getLang($s[0]);
25--- dokuwiki-plugin-data-20100608/lang/en/lang.php 2010-11-03 15:20:30.000000000 +0200
26+++ dokuwiki-plugin-data-20100608/lang/en/lang.php 2010-12-01 19:50:59.217678000 +0200
27@@ -16,6 +16,7 @@
28 $lang['page'] = 'Page';
29 $lang['title'] = 'Page Name';
30 $lang['class'] = 'Page Class';
31+$lang['rpm'] = 'RPM Package';
32
33 $lang['name'] = 'Type Alias';
34 $lang['type'] = 'Original Type';
35--- dokuwiki-plugin-data-20100608/syntax/table.php 2010-11-03 15:20:30.000000000 +0200
36+++ dokuwiki-plugin-data-20100608/syntax/table.php 2010-12-01 19:50:59.217678000 +0200
37@@ -328,6 +328,13 @@
38 $select[] = '" " || pages.class';
39 }elseif($key == '%title%'){
40 $select[] = "pages.page || '|' || pages.title";
41+ }elseif($key == '%rpm%'){
42+ if(!isset($tables[$key])){
43+ $tables[$key] = 'T'.(++$cnt);
44+ $from .= ' LEFT JOIN rpmdb AS '.$tables[$key].' ON '.$tables[$key].'.pid = pages.pid';
45+ }
46+ $select[] = "group_concat(".$tables[$key].".value,'\n')";
47+
48 }else{
49 if(!isset($tables[$key])){
50 $tables[$key] = 'T'.(++$cnt);
This page took 0.36542 seconds and 4 git commands to generate.