Index: openacs-4/packages/new-portal/sql/oracle/api-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/oracle/api-create.sql,v
diff -u -r1.40 -r1.41
--- openacs-4/packages/new-portal/sql/oracle/api-create.sql	30 Sep 2003 13:11:40 -0000	1.40
+++ openacs-4/packages/new-portal/sql/oracle/api-create.sql	29 Jun 2004 10:18:36 -0000	1.41
@@ -130,11 +130,13 @@
 
                 update portal_pages
                 set sort_key = -1
-                where sort_key = i;
+                where sort_key = i
+		and page_id = portal_page.del.page_id;
 
                 update portal_pages
                 set sort_key = i - 1
-                where sort_key = -1;
+                where sort_key = -1
+		and page_id = portal_page.del.page_id;
 
             end if;
 
