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.42 -r1.43 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 25 Nov 2008 17:08:50 -0000 1.42 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 17 Mar 2009 01:11:07 -0000 1.43 @@ -1072,66 +1072,3 @@ } { return [db_list_of_lists get {}] } - -ad_proc -public subsite::util::get_package_descendent_options { - package_key -} { - Get a list of pretty name, package key pairs for all subsite packages which are descendents - of the given package key. - - @param package_key The parent package's key. - @return a list of pretty name, package key pairs suitable for use in a template - select widget. -} { - set in_clause '[join [apm_package_descendents $package_key] ',']' - return [db_list_of_lists get {}] -} - -ad_proc -public subsite::util::convert_type { - -subsite_id - -old_package_key - -new_package_key:required -} { - Convert a subsite to a new type, doing the proper instantiate and mount callbacks and - parameter creation. - - @param subsite_id The package id of the subsite to convert (default current subsite) - @param old_package_key The package key we're converting from (default current package key) - @param new_package_key The new subsite type we're converting to (required) - -} { - if { ![info exists subsite_id] } { - set subsite_id [ad_conn subsite_id] - } - - if { ![info exists old_package_key] } { - set old_package_key [ad_conn package_key] - } - - set node_id [site_node::get_node_id_from_object_id -object_id $subsite_id] - - db_dml update_package_key {} - site_node::update_cache -node_id $node_id - - db_foreach get_params {} { - db_1row get_new_parameter_id {} - db_dml update_param {} - } - db_list copy_new_params {} - apm_parameter_sync $new_package_key $subsite_id - - foreach inherited_package_key [apm_package_inherit_order $new_package_key] { - if { [lsearch -exact [apm_package_inherit_order $old_package_key] $inherited_package_key] - == -1 } { - apm_invoke_callback_proc \ - -package_key $inherited_package_key \ - -type after-instantiate \ - -arg_list [list package_id $subsite_id] - apm_invoke_callback_proc \ - -package_key $inherited_package_key \ - -type after-mount \ - -arg_list [list node_id $node_id package_id $subsite_id] - } - } - -}