Index: openacs-4/packages/acs-subsite/www/admin/configure.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/configure.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/www/admin/configure.adp 9 Sep 2003 09:44:52 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/admin/configure.adp 10 Sep 2003 09:38:29 -0000 1.4 @@ -1,8 +1,7 @@ @page_title@ @context@ + name.instance_name -

- TODO: Edit subsite name -

+ Index: openacs-4/packages/acs-subsite/www/admin/configure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/configure.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/configure.tcl 28 Aug 2003 09:41:40 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/configure.tcl 10 Sep 2003 09:38:29 -0000 1.3 @@ -6,7 +6,20 @@ @cvs-id $Id$ } -set page_title "[ad_conn instance_name] Configuration" +set page_title "Subsite Configuration" set context [list "Configuration"] +ad_form -name name -mode display -form { + {instance_name:text + {label "Subsite name"} + {html {size 50}} + } +} -on_request { + set instance_name [ad_conn instance_name] +} -on_submit { + apm_package_rename -instance_name $instance_name +} -after_submit { + ad_returnredirect [ad_conn url] + ad_script_abort +} Index: openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl 6 Jul 2002 14:05:22 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/admin/site-map/rename.tcl 10 Sep 2003 09:38:29 -0000 1.2 @@ -35,14 +35,11 @@ # on site_nodes. Until we have a general framework for mutators # I can hardly do anything better. -db_dml app_rename { - update apm_packages - set instance_name = :instance_name - where package_id = (select object_id - from site_nodes - where node_id=:node_id) -} +set package_id [site_node::get_object_id -node_id $node_id] -site_nodes_sync +apm_package_rename \ + -package_id $package_id \ + -instance_name $instance_name -ad_returnredirect "./?[export_url_vars expand:multiple root_id]" + +ad_returnredirect [export_vars -base "." { expand:multiple root_id }]