Index: openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql 2 Jun 2001 07:33:06 -0000 1.1 +++ openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql 19 Jul 2001 16:01:00 -0000 1.2 @@ -25,19 +25,19 @@ b.parent_id, bm_urls.complete_url, b.folder_p - from (select bookmark_id, url_id, local_title, folder_p, tree_level(tree_sortkey) lev, - parent_id, owner_id, 999 ord_num from bm_bookmarks + from (select bookmark_id, url_id, local_title, folder_p, + parent_id, owner_id from bm_bookmarks where tree_sortkey like ( - select tree_sortkey || ''%'' + select tree_sortkey || '%' from bm_bookmarks where bookmark_id = :root_folder_id ) - order by tree_sortkey) b left join bm_urls using (url_id), + order by tree_sortkey) b left join bm_urls using (url_id), acs_objects where owner_id = :user_id and acs_objects.object_id = b.bookmark_id - order by ord_num + order by tree_sortkey