Index: openacs-4/packages/layout-managed-subsite/convert-subsites.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/layout-managed-subsite/Attic/convert-subsites.tcl,v diff -u -N --- openacs-4/packages/layout-managed-subsite/convert-subsites.tcl 26 Nov 2008 11:10:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ -ad_page_contract { - - Convert acs-subsites to mgh-subsites. - - @author Don Baccus (dhogaza@pacifier.com) - @creation-date - @cvs-id $Id: convert-subsites.tcl,v 1.1 2008/11/26 11:10:22 donb Exp $ - -} { - subsite_id:notnull -} - -foreach one_subsite_id $subsite_id { - set node_id [site_node::get_node_id_from_object_id -object_id $one_subsite_id] - set name user$one_subsite_id - db_dml q { - update apm_packages - set package_key = 'layout-managed-subsite' - where package_id = :one_subsite_id - } - db_foreach {parameter_id default_value} [db_list_of_lists q { - select ap.parameter_id, ap.default_value - from apm_parameters ap - where ap.package_key = 'layout-managed-subsite' - and not exists (select 1 - from apm_parameter_values apv - where apv.package_id = :one_subsite_id - and apv.parameter_id = ap.parameter_id} - db_exec_plsql q { - select apm_parameter_value__new(null, :one_subsite_id, :parameter_id, :default_value) - } - } - site_node::update_cache -node_id $node_id -} -ad_returnredirect subsites Index: openacs-4/packages/layout-managed-subsite/subsites.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/layout-managed-subsite/Attic/subsites.adp,v diff -u -N --- openacs-4/packages/layout-managed-subsite/subsites.adp 26 Nov 2008 11:10:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,9 +0,0 @@ - -

-Convert these from the top down ("/", then the subsites mounted under "/", etc) -

-You MUST convert the parent subsite ("/", most likely) before mounting your mgh subsite -underneath. -

You'll have to restart your server after you've finished converting your acs-subsites to mgh-subsites

-

Existing subsites

- Index: openacs-4/packages/layout-managed-subsite/subsites.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/layout-managed-subsite/Attic/subsites.tcl,v diff -u -N --- openacs-4/packages/layout-managed-subsite/subsites.tcl 26 Nov 2008 11:10:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,36 +0,0 @@ -ad_page_contract { - - List acs-subsites and offer to convert them to mgh-subsites. - - @author Don Baccus (dhogaza@pacifier.com) - @creation-date - @cvs-id $Id: subsites.tcl,v 1.1 2008/11/26 11:10:22 donb Exp $ - -} - -db_multirow -extend {convert_url subsite_url} acs_subsites q { - select package_id as subsite_id - from apm_packages - where package_key = 'acs-subsite' - order by subsite_id -} { - set convert_url [export_vars -base convert-subsites {subsite_id}] - set subsite_url [site_node::get_url_from_object_id -object_id $subsite_id] -} - -template::list::create \ - -name acs_subsites \ - -multirow acs_subsites \ - -key subsite_id \ - -elements { - subsite_url { - label {Subsite URL} - } - convert { - label {Convert to a layout managed subsite} - link_url_col convert_url - link_html { title Convert class button } - display_template {Convert} - } - } -