Index: openacs-4/packages/file-storage/tcl/file-storage-search-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-search-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/tcl/file-storage-search-procs-postgresql.xql 18 Dec 2001 20:56:35 -0000 1.1 +++ openacs-4/packages/file-storage/tcl/file-storage-search-procs-postgresql.xql 22 Sep 2002 19:05:45 -0000 1.2 @@ -29,9 +29,9 @@ (select i2.parent_id from cr_items i1, cr_items i2, cr_revisions r where i1.item_id = r.item_id - and r.revision_id = $revision_id + and r.revision_id = :revision_id and i2.tree_sortkey <= i1.tree_sortkey - and i1.tree_sortkey like (i2.tree_sortkey || '%')) as i + and i1.tree_sortkey i2.tree_sortkey and tree_right(i2.tree_sortkey)) as i where f.folder_id = i.parent_id