Index: openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql 4 Sep 2004 14:51:20 -0000 1.1 +++ openacs-4/packages/lorsm/tcl/lorsm-procs-postgresql.xql 12 Dec 2008 14:25:33 -0000 1.2 @@ -2,93 +2,75 @@ postgresql7.1 - - + + + select 0 as tree_level, '' as name , 'Home' as title + union + select t.tree_level, i.name, content_item.get_title(t.context_id) as title + from (select o2.context_id, tree_level(o2.tree_sortkey) as tree_level + from ( select * + from acs_objects + where object_id = :item_id ) + o1, acs_objects o2 + where context_id <> content_item__get_root_folder() + and o1.tree_sortkey between o2.tree_sortkey + and tree_right(o2.tree_sortkey)) t, cr_items i + where i.item_id = t.context_id + order by tree_level + + - select 0 as tree_level, '' as name , 'Home' as title - UNION - select t.tree_level, i.name, content_item.get_title(t.context_id) as title - from (select o2.context_id, tree_level(o2.tree_sortkey) as tree_level - from (select * from acs_objects where object_id = :item_id) o1, acs_objects o2 - where context_id <> content_item__get_root_folder() - and o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey)) t, - cr_items i - where i.item_id = t.context_id - order by tree_level + + + select 1 + + - - + + + select content + from cr_revisions + where revision_id = :revision_id + + - - - select 1 + + + select content_item__get_id(:url, :content_root, 'f') as item_id + + - - + + + select content_type + from cr_items + where item_id=:item_id + + - - - - select - content - from - cr_revisions - where - revision_id = :revision_id - - - + + + select item_id, content_type + from cr_items + where item_id = :item_id + + + + + select + content_item__get_live_revision(content_item__get_template(:item_id, :context)) as template_id, + content_template__get_path(content_item__get_template(:item_id, :context),:template_root) as template_url + from dual + + - - - select content_item__get_id(:url, :content_root, 'f') as item_id - - + + + select content_template__get_path(content_item__get_template(:item_id, :context),:template_root) as template_url + from dual + + - - - select content_type from cr_items where item_id=:item_id - - - - - - - select - item_id, content_type - from - cr_items - where - item_id = :item_id - - - - - - - - select - content_item__get_live_revision(content_item__get_template(:item_id, :context)) as template_id, - content_template__get_path(content_item__get_template(:item_id, :context),:template_root) as template_url - from - dual - - - - - - - - - select - content_template__get_path( - content_item__get_template(:item_id, :context),:template_root) as template_url - from - dual - - - -