Index: openacs-4/packages/new-portal/sql/postgresql/api-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/postgresql/api-create.sql,v
diff -u -r1.11 -r1.11.6.1
--- openacs-4/packages/new-portal/sql/postgresql/api-create.sql	29 May 2003 18:04:55 -0000	1.11
+++ openacs-4/packages/new-portal/sql/postgresql/api-create.sql	17 Jun 2004 01:23:53 -0000	1.11.6.1
@@ -110,11 +110,13 @@
 
             update portal_pages
             set sort_key = -1
-            where sort_key = i;
+            where sort_key = i
+	    and page_id = p_page_id;
 
             update portal_pages
             set sort_key = i - 1
-            where sort_key = -1;
+            where sort_key = -1
+	    and page_id = p_page_id;
 
         end if;
 
