Index: openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl,v diff -u -r1.13.2.4 -r1.13.2.5 --- openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl 3 Mar 2020 18:38:15 -0000 1.13.2.4 +++ openacs-4/packages/acs-subsite/tcl/apm-callback-procs.tcl 31 Aug 2020 12:42:21 -0000 1.13.2.5 @@ -6,6 +6,20 @@ namespace eval subsite {} +ad_proc -private subsite::after_mount { + {-package_id:required} + {-node_id:required} +} { + This is the Tcl proc that is called automatically by the APM + whenever a new instance of the subsites application is mounted. + + @author Don Baccus (dhogaza@pacifier.com) + @creation-date 2003-03-05 + +} { + subsite::default::create_app_group -package_id $package_id +} + ad_proc -private subsite::package_install {} {} { set type_id [content::type::new \ -content_type "email_image" -pretty_name "Email_Image" \ @@ -18,6 +32,62 @@ } +ad_proc -private subsite::before_uninstantiate { + {-package_id:required} +} { + + Delete the application group associated with this subsite. + +} { + subsite::default::delete_app_group -package_id $package_id +} + +ad_proc -private subsite::before_upgrade { + {-from_version_name:required} + {-to_version_name:required} +} { + Handles upgrade +} { + apm_upgrade_logic \ + -from_version_name $from_version_name \ + -to_version_name $to_version_name \ + -spec { + 5.0d3 5.0d4 { + array set main_site [site_node::get -url /] + set main_site_id $main_site(package_id) + + # Move parameter values from subsite to kernel + + parameter::set_value \ + -package_id [ad_acs_kernel_id] \ + -parameter ApprovalExpirationDays \ + -value [parameter::get \ + -package_id $main_site_id \ + -parameter ApprovalExpirationDays \ + -default 0] + + parameter::set_value \ + -package_id [ad_acs_kernel_id] \ + -parameter PasswordExpirationDays \ + -value [parameter::get \ + -package_id $main_site_id \ + -parameter PasswordExpirationDays \ + -default 0] + + + apm_parameter_unregister \ + -package_key acs-subsite \ + -parameter ApprovalExpirationDays \ + {} + + apm_parameter_unregister \ + -package_key acs-subsite \ + -parameter PasswordExpirationDays \ + {} + } + } +} + ad_proc -private subsite::after_upgrade { {-from_version_name:required} {-to_version_name:required} Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -r1.68.2.14 -r1.68.2.15 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 21 Jul 2020 14:08:50 -0000 1.68.2.14 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 31 Aug 2020 12:42:21 -0000 1.68.2.15 @@ -13,78 +13,6 @@ namespace eval default {} } -ad_proc -public subsite::after_mount { - {-package_id:required} - {-node_id:required} -} { - This is the Tcl proc that is called automatically by the APM - whenever a new instance of the subsites application is mounted. - - @author Don Baccus (dhogaza@pacifier.com) - @creation-date 2003-03-05 - -} { - subsite::default::create_app_group -package_id $package_id -} - - - -ad_proc -public subsite::before_uninstantiate { - {-package_id:required} -} { - - Delete the application group associated with this subsite. - -} { - subsite::default::delete_app_group -package_id $package_id -} - -ad_proc -public subsite::before_upgrade { - {-from_version_name:required} - {-to_version_name:required} -} { - Handles upgrade -} { - apm_upgrade_logic \ - -from_version_name $from_version_name \ - -to_version_name $to_version_name \ - -spec { - 5.0d3 5.0d4 { - array set main_site [site_node::get -url /] - set main_site_id $main_site(package_id) - - # Move parameter values from subsite to kernel - - parameter::set_value \ - -package_id [ad_acs_kernel_id] \ - -parameter ApprovalExpirationDays \ - -value [parameter::get \ - -package_id $main_site_id \ - -parameter ApprovalExpirationDays \ - -default 0] - - parameter::set_value \ - -package_id [ad_acs_kernel_id] \ - -parameter PasswordExpirationDays \ - -value [parameter::get \ - -package_id $main_site_id \ - -parameter PasswordExpirationDays \ - -default 0] - - - apm_parameter_unregister \ - -package_key acs-subsite \ - -parameter ApprovalExpirationDays \ - {} - - apm_parameter_unregister \ - -package_key acs-subsite \ - -parameter PasswordExpirationDays \ - {} - } - } -} - ad_proc -public subsite::pivot_root { -node_id:required } {