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.172.2.2.4.4 -r1.172.2.2.4.5 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 16 Jul 2004 05:40:34 -0000 1.172.2.2.4.4 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 22 Jul 2004 05:47:00 -0000 1.172.2.2.4.5 @@ -146,7 +146,7 @@ set page_name_list [list "Page 1"] set layout_name_list [list "#new-portal.simple_2column_layout_name#"] - + ns_log Warning "CREATING A NEW PORTAL" if {![empty_string_p $csv_list]} { set page_name_and_layout_list [split [string trimright $csv_list ";"] ";"] set page_name_list [list] @@ -718,6 +718,17 @@ db_dml revert_page_update {} + # First, hide all elements. + # If there are new content portlets that are not + # in the default template, this will ensure they don't come + # up. + + db_dml hide_all_elements { + update portal_element_map + set state = 'hidden' + where page_id = :target_page_id + } + # revert elements in two steps like "swap" db_foreach revert_get_source_elements {} { # the element might not be on the target page... @@ -1998,8 +2009,7 @@ if {[llength $element_id_list] == 0} { db_transaction { - - # Tell portal to add this element to the page + # Tell portal to add this element to the page set element_id [add_element \ -portal_id $portal_id \ -portlet_name $portlet_name \