close
Warning:
Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.
- Timestamp:
-
Feb 2, 2016, 9:32:50 AM (9 years ago)
- Author:
-
Pedro Gea
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
18 | 18 | |
19 | 19 | = Left Menu = |
| 20 | |
| 21 | This page contains the left menu used in the main pages. |
| 22 | |
| 23 | The menu in this page can be applied to the others using the following query: |
| 24 | {{{ |
| 25 | #!sql |
| 26 | UPDATE tolsch.wiki a |
| 27 | SET text = regexp_replace(a.text, '<LEFT-MENU>.*</LEFT-MENU>', m.lmenu) |
| 28 | FROM ( |
| 29 | SELECT name, Max(version) as version |
| 30 | FROM tolsch.wiki |
| 31 | WHERE text LIKE '%<LEFT-MENU>%' AND name <> 'LeftMenu' |
| 32 | GROUP BY name |
| 33 | ) av, ( |
| 34 | SELECT (regexp_matches(text, '<LEFT-MENU>.*</LEFT-MENU>'))[1] as lmenu |
| 35 | FROM tolsch.wiki b, ( |
| 36 | SELECT Max(version) as version |
| 37 | FROM tolsch.wiki |
| 38 | WHERE name = 'LeftMenu' |
| 39 | ) bv |
| 40 | WHERE b.name = 'LeftMenu' AND b.version = bv.version |
| 41 | ) m |
| 42 | WHERE a.name = av.name AND a.version = av.version |
| 43 | }}} |