Index: openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql,v diff -u -r1.22 -r1.23 --- openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 15 May 2007 20:14:48 -0000 1.22 +++ openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 8 Aug 2007 11:43:57 -0000 1.23 @@ -176,4 +176,26 @@ + + + select * + from (select page_id + from portal_pages + where portal_id = :portal_id + order by sort_key desc) + where rownum = 1 + + + + + + select * + from (select page_id + from portal_pages + where portal_id = :portal_id + order by sort_key) + where rownum = 1 + + + Index: openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 15 May 2007 20:14:48 -0000 1.11 +++ openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 8 Aug 2007 11:43:57 -0000 1.12 @@ -180,4 +180,24 @@ + + + select page_id + from portal_pages + where portal_id = :portal_id + order by sort_key desc + limit 1 + + + + + + select page_id + from portal_pages + where portal_id = :portal_id + order by sort_key + limit 1 + + + 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.46 -r1.47 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 15 May 2007 20:14:48 -0000 1.46 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 8 Aug 2007 11:43:57 -0000 1.47 @@ -146,26 +146,6 @@ - - - select page_id - from portal_pages - where portal_id = :portal_id - order by sort_key desc - limit 1 - - - - - - select page_id - from portal_pages - where portal_id = :portal_id - order by sort_key - limit 1 - - - select element_id