Index: openacs-4/packages/bookmarks/www/permissions-reset-all-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/permissions-reset-all-2-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bookmarks/www/permissions-reset-all-2-postgresql.xql 13 Sep 2001 20:27:19 -0000 1.1 +++ openacs-4/packages/bookmarks/www/permissions-reset-all-2-postgresql.xql 8 Dec 2001 01:17:59 -0000 1.2 @@ -11,13 +11,9 @@ where object_id in ( - select bookmark_id from bm_bookmarks - where tree_sortkey like - ( - select tree_sortkey || '%' - from bm_bookmarks - where bookmark_id = :root_folder_id - ) + select bm.bookmark_id from bm_bookmarks bm, bm_bookmarks bm2 + where bm.tree_sortkey between bm2.tree_sortkey and tree_right(bm2.tree_sortkey) + and bm2.bookmark_id = :root_folder_id ) and grantee_id <> :viewed_user_id @@ -34,13 +30,9 @@ where object_id in ( - select bookmark_id from bm_bookmarks - where tree_sortkey like - ( - select tree_sortkey || '%' - from bm_bookmarks - where bookmark_id = :root_folder_id - ) + select bookmark_id from bm_bookmarks bm, bm_bookmarks bm2 + where bm.tree_sortkey between bm2.tree_sortkey and tree_right(bm2.tree_sortkey) + and bm2.bookmark_id = :root_folder_id )