Index: openacs-4/packages/bookmarks/bookmarks.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/bookmarks.info,v diff -u -r1.16 -r1.17 --- openacs-4/packages/bookmarks/bookmarks.info 18 Aug 2001 02:57:34 -0000 1.16 +++ openacs-4/packages/bookmarks/bookmarks.info 8 Sep 2001 22:09:46 -0000 1.17 @@ -1,5 +1,5 @@ - + Bookmarks @@ -170,10 +170,10 @@ - - - + + + Index: openacs-4/packages/bookmarks/www/tree-dynamic-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/tree-dynamic-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bookmarks/www/tree-dynamic-postgresql.xql 7 Sep 2001 02:04:36 -0000 1.2 +++ openacs-4/packages/bookmarks/www/tree-dynamic-postgresql.xql 8 Sep 2001 22:09:46 -0000 1.3 @@ -5,33 +5,38 @@ - FIX ME REMOVE OPTIMIZATION HINT -FIX ME CONNECT BY -FIX ME OUTER JOIN -FIX ME ROWNUM +select + b.bookmark_id, b.url_id, b.local_title, last_live_date, + last_checked_date, b.parent_id, complete_url, b.folder_p +from + ( + select + bookmark_id, url_id, local_title, folder_p, + parent_id, owner_id, tree_sortkey from bm_bookmarks + where tree_sortkey like + ( + select tree_sortkey || '%' + from bm_bookmarks + where bookmark_id = :root_id + ) + order by tree_sortkey + ) + b left join bm_urls using (url_id) +where exists + ( + select 1 from bm_bookmarks + where tree_sortkey like + ( + select tree_sortkey || '%' + from bm_bookmarks + where bookmark_id = b.bookmark_id + ) + and acs_permission__permission_p(bookmark_id, :user_id, 'read') = 't' + ) +and b.bookmark_id <> :root_id +order by tree_sortkey - select b.bookmark_id, - - b.url_id, - b.local_title, - last_live_date, - last_checked_date, - b.parent_id, - complete_url, - b.folder_p - from (select /*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/ - bookmark_id, url_id, local_title, folder_p, - level lev, parent_id, owner_id, rownum as ord_num - from bm_bookmarks start with bookmark_id = :root_id - connect by prior bookmark_id = parent_id) b, - bm_urls - where exists (select 1 from bm_bookmarks where acs_permission__permission_p(bookmark_id, :user_id, 'read') = 't' - start with bookmark_id = b.bookmark_id connect by prior bookmark_id = parent_id) - and b.bookmark_id <> :root_id - and b.url_id = bm_urls.url_id(+) - order by ord_num - - +