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.4 -r1.5 --- openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 11 Jun 2002 04:20:10 -0000 1.4 +++ openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 28 Jun 2002 20:08:29 -0000 1.5 @@ -65,7 +65,7 @@ - + update portal_element_map set page_id = :page_id, Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -r1.151 -r1.152 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 28 Jun 2002 17:54:27 -0000 1.151 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 28 Jun 2002 20:08:29 -0000 1.152 @@ -674,7 +674,10 @@ set region 1 db_foreach revert_move_elements_for_del {} { - db_dml move_to_page_update {} + portal::move_element_to_page \ + -page_id $page_id \ + -element_id $element_id \ + -region 1 } page_delete -page_id $max_page_id @@ -1274,10 +1277,16 @@ ad_proc -private move_element_to_page { {-page_id:required} {-element_id:required} + {-region ""} } { Moves a PE to the given page } { - set curr_reg [get_element_region -element_id $element_id] + if {[empty_string_p $region]} { + set curr_reg [get_element_region -element_id $element_id] + } else { + set curr_reg $region + } + set target_reg_num [get_layout_region_count_not_cached \ -layout_id [get_layout_id -page_id $page_id] ] 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.35 -r1.36 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 11 Jun 2002 04:25:51 -0000 1.35 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 28 Jun 2002 20:08:29 -0000 1.36 @@ -46,13 +46,17 @@ - select element_id, region, pem.sort_key - from portal_element_map pem, portal_pages pp - where pp.portal_id = :portal_id - and pem.page_id = :page_id - and pem.page_id = pp.page_id - and state != 'hidden' - order by region, sort_key + select portal_element_map.element_id, + portal_element_map.region, + portal_element_map.sort_key + from portal_element_map, + portal_pages + where portal_pages.portal_id = :portal_id + and portal_element_map.page_id = :page_id + and portal_element_map.page_id = portal_pages.page_id + and portal_element_map.state != 'hidden' + order by portal_element_map.region, + portal_element_map.sort_key