Index: openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl 27 Feb 2005 22:45:40 -0000 1.2 +++ openacs-4/packages/acs-templating/tcl/apm-callback-procs.tcl 18 Aug 2006 19:03:06 -0000 1.3 @@ -56,3 +56,38 @@ } } } + +ad_proc -private template::apm::after_upgrade { + {-from_version_name:required} + {-to_version_name:required} +} { + after upgrade apm callback for acs-templating. +} { + apm_upgrade_logic \ + -from_version_name $from_version_name \ + -to_version_name $to_version_name \ + -spec { + 5.3.0d1 5.3.0d2 { + db_transaction { + # mount acs-templating so we can address + # executable tcl scripts under www with a url + set package_id [apm_package_id_from_key acs-templating] + array set main_subsite \ + [site_node::get_from_url \ + -url "/" \ + -exact] + + set node_id [site_node::new \ + -parent_id $main_subsite(node_id) \ + -name acs-templating] + site_node::mount -node_id $node_id -object_id $package_id + # acs-templating needs to inherit permissions from + # the main subsite so users can actually read the + # files under it +# acs_object::set_context_id \ + -object_id $package_id \ + -context_id $main_subsite(object_id) + } + } + } +}