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.

Changes between Version 1 and Version 2 of LeftMenu


Ignore:
Timestamp:
Feb 2, 2016, 9:32:50 AM (9 years ago)
Author:
Pedro Gea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LeftMenu

    v1 v2  
    1818
    1919= Left Menu =
     20
     21This page contains the left menu used in the main pages.
     22
     23The menu in this page can be applied to the others using the following query:
     24{{{
     25#!sql
     26UPDATE tolsch.wiki a
     27SET text = regexp_replace(a.text, '<LEFT-MENU>.*</LEFT-MENU>', m.lmenu)
     28FROM (
     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
     42WHERE a.name = av.name AND a.version = av.version
     43}}}