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.24 -r1.24.8.1 --- openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 24 Apr 2009 11:51:20 -0000 1.24 +++ openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 8 Jan 2020 11:55:18 -0000 1.24.8.1 @@ -27,36 +27,6 @@ - - - update portal_element_map - set region = :region, - page_id = :page_id, - sort_key = (select nvl((select max(pem.sort_key) + 1 - from portal_element_map pem - where pem.page_id = :page_id - and region = :region), - 1) - from dual) - where element_id = :element_id - - - - - - update portal_element_map - set page_id = :page_id, - region = :region, - sort_key = (select nvl((select max(sort_key) + 1 - from portal_element_map - where page_id = :page_id - and region = :region), - 1) - from dual) - where element_id = :element_id - - - insert into portal_element_parameters @@ -76,15 +46,6 @@ - - - insert into portal_element_map - (element_id, name, pretty_name, page_id, datasource_id, region, sort_key) - values - (:new_element_id, :ds_name, :pretty_name, :page_id, :ds_id, :region, :sort_key) - - - insert into portal_element_parameters @@ -99,20 +60,6 @@ - - - update portal_element_map - set region = :target_region, - sort_key = (select nvl((select max(pem.sort_key) + 1 - from portal_element_map pem - where page_id = :my_page_id - and region = :target_region), - 1) - from dual) - where element_id = :element_id - - - begin 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.13 -r1.13.8.1 --- openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 24 Apr 2009 11:51:20 -0000 1.13 +++ openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 8 Jan 2020 11:55:19 -0000 1.13.8.1 @@ -28,36 +28,6 @@ - - - update portal_element_map - set region = :region, - page_id = :page_id, - sort_key = (select coalesce((select max(pem.sort_key) + 1 - from portal_element_map pem - where pem.page_id = :page_id - and region = :region), - 1) - from dual) - where element_id = :element_id - - - - - - update portal_element_map - set page_id = :page_id, - region = :region, - sort_key = (select coalesce((select max(sort_key) + 1 - from portal_element_map - where page_id = :page_id - and region = :region), - 1) - from dual) - where element_id = :element_id - - - insert into portal_element_parameters @@ -77,15 +47,6 @@ - - - insert into portal_element_map - (element_id, name, pretty_name, page_id, datasource_id, region, sort_key) - values - (:new_element_id, :ds_name, :pretty_name, :page_id, :ds_id, :region, :sort_key) - - - insert into portal_element_parameters @@ -100,20 +61,6 @@ - - - update portal_element_map - set region = :target_region, - sort_key = (select coalesce((select max(pem.sort_key) + 1 - from portal_element_map pem - where page_id = :my_page_id - and region = :target_region), - 1) - from dual) - where element_id = :element_id - - - select portal_page__new( 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.52.2.1 -r1.52.2.2 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 1 Mar 2019 10:00:15 -0000 1.52.2.1 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 8 Jan 2020 11:55:19 -0000 1.52.2.2 @@ -30,6 +30,21 @@ + + + update portal_element_map + set page_id = :page_id, + region = :region, + sort_key = (select coalesce((select max(sort_key) + 1 + from portal_element_map + where page_id = :page_id + and region = :region), + 1) + from dual) + where element_id = :element_id + + + select name @@ -391,6 +406,15 @@ + + + insert into portal_element_map + (element_id, name, pretty_name, page_id, datasource_id, region, sort_key) + values + (:new_element_id, :ds_name, :pretty_name, :page_id, :ds_id, :region, :sort_key) + + + select page_id as target_page_id @@ -400,6 +424,21 @@ + + + update portal_element_map + set region = :region, + page_id = :page_id, + sort_key = (select coalesce((select max(pem.sort_key) + 1 + from portal_element_map pem + where pem.page_id = :page_id + and region = :region), + 1) + from dual) + where element_id = :element_id + + + select page_id @@ -520,6 +559,20 @@ + + + update portal_element_map + set region = :target_region, + sort_key = (select coalesce((select max(pem.sort_key) + 1 + from portal_element_map pem + where page_id = :my_page_id + and region = :target_region), + 1) + from dual) + where element_id = :element_id + + + select value