Index: openacs-4/packages/new-portal/tcl/portal-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/new-portal/tcl/portal-procs.xql 21 Jan 2002 06:29:55 -0000 1.5
+++ openacs-4/packages/new-portal/tcl/portal-procs.xql 21 Jan 2002 07:16:14 -0000 1.6
@@ -308,26 +308,28 @@
select sort_key as other_sort_key, element_id as other_element_id
- from (select sort_key, element_id
- from portal_element_map
- where portal_id = :portal_id
+ from (select pem.sort_key, element_id
+ from portal_element_map pem, portal_pages pp
+ where pp.portal_id = :portal_id
+ and pp.page_id = pem.page_id
and region = :region
- and sort_key < :sort_key
+ and pem.sort_key < :sort_key
and state != 'pinned'
- order by sort_key desc) where rownum = 1
+ order by pem.sort_key desc) where rownum = 1
select sort_key as other_sort_key, element_id as other_element_id
- from (select sort_key, element_id
- from portal_element_map
- where portal_id = :portal_id
+ from (select pem.sort_key, element_id
+ from portal_element_map pem, portal_pages pp
+ where pp.portal_id = :portal_id
+ and pem.page_id = pp.page_id
and region = :region
- and sort_key > :sort_key
+ and pem.sort_key > :sort_key
and state != 'pinned'
- order by sort_key) where rownum = 1
+ order by pem.sort_key) where rownum = 1