Index: openacs-4/packages/cms/tcl/module-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/module-procs-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/cms/tcl/module-procs-postgresql.xql 12 Aug 2001 14:49:52 -0000 1.2 +++ openacs-4/packages/cms/tcl/module-procs-postgresql.xql 14 Aug 2001 18:11:30 -0000 1.3 @@ -2,23 +2,8 @@ postgresql7.1 - - - - select - item_id, - content_item__get_path(item_id, :sorted_paths_root_id) as item_path, - content_type as item_type - from - cr_items - where - item_id in ($sql_id_list) - order by item_path - - - - + select @@ -44,23 +29,23 @@ - + select content_template__get_root_folder(null) - + select content_item__get_root_folder(null) - + FIX ME CONNECT BY @@ -77,29 +62,28 @@ - - + + - - select - :mount_point as mount_point, - r.name, - r.item_id, - '' as children, - coalesce((select 't' where exists - (select 1 from cr_folders f_child, cr_resolved_items r_child - where r_child.parent_id = r.resolved_id - and f_child.folder_id = r_child.resolved_id)), 'f') expandable, - r.is_symlink symlink, - 0 update_time - from - cr_folders f, cr_resolved_items r - where - r.parent_id = :id - and - r.resolved_id = f.folder_id - order by - name + + select + :module_name as mount_point, + t.pretty_name, + t.object_type, + '' as children, + ( CASE WHEN + (select count(*) from acs_object_types + where supertype = t.object_type) = 0 + THEN 'f' ELSE 't' END ) as expandable, + 'f' as symlink, + 0 as update_time + from + acs_object_types t + where + supertype = :id + order by + t.pretty_name + @@ -112,12 +96,12 @@ content_keyword__get_heading(keyword_id) as name, keyword_id, '' as children, - coalesce( (select 't' - where exists ( - select 1 from cr_keywords k2 + (CASE WHEN ( + select 1 from cr_keywords k2 where k2.parent_id = k.keyword_id - and content_keyword__is_leaf(k2.keyword_id) = 'f')), - 'f') as expandable, + and content_keyword__is_leaf(k2.keyword_id) = 'f') + ) = 1 THEN 't' ELSE 'f' END + ) as expandable, 'f' as symlink, 0 as update_time from @@ -131,34 +115,8 @@ - - - - - select - :mount_point as mount_point, - r.name, - r.item_id, - '' as children, - coalesce((select 't' where exists - (select 1 from cr_folders f_child, cr_resolved_items r_child - where r_child.parent_id = r.resolved_id - and f_child.folder_id = r_child.resolved_id)), 'f') expandable, - r.is_symlink symlink, - 0 update_time - from - cr_folders f, cr_resolved_items r - where - r.parent_id = :id - and - r.resolved_id = f.folder_id - order by - name - - - - + select item_id, @@ -173,7 +131,7 @@ - + select @@ -188,7 +146,7 @@ - + select