Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.193 -r1.194 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 13 Jun 2005 17:47:21 -0000 1.193 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 13 Jun 2005 20:13:45 -0000 1.194 @@ -2269,4 +2269,28 @@ -list_args [list $community_id $event $old_value $new_value] } + ad_proc -public get_package_id_from_package_key { + {-package_key:required} + {-community_id:required} + } { + Return the package_id of a certain package type mounted in a community + + @author Malte Sussdorff (sussdorff@sussdorff.de) + @creation-date 2005-06-13 + + @param package_key + + @param community_id + + @return + + @error + } { + + set package_id [dotlrn_community::get_package_id $community_id] + set site_node_id [site_node::get_node_id_from_object_id -object_id $package_id] + set url [site_node::get_children -package_key "$package_key" -node_id $site_node_id] + array set site_node [site_node::get_from_url -url $url] + return $site_node(package_id) + } } \ No newline at end of file