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.198.2.1 -r1.198.2.2 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 21 Jul 2007 14:50:02 -0000 1.198.2.1 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 4 Sep 2007 08:15:17 -0000 1.198.2.2 @@ -1034,13 +1034,22 @@ {-package_id ""} } { Returns the community id depending on the package_id - we're at, or the package_id passed in + we're at, or the package_id passed in. + + If no community_id found, return empty_string + + @param package_id PackageID for which to search the community_id for + @return community_id of the community where the package is mounted, empty string if not found } { if {[empty_string_p $package_id]} { set package_id [site_node_closest_ancestor_package -default [ad_conn package_id] dotlrn] } - return [util_memoize "dotlrn_community::get_community_id_not_cached -package_id $package_id"] + if {$package_id ne ""} { + return [util_memoize "dotlrn_community::get_community_id_not_cached -package_id $package_id"] + } else { + return "" + } } ad_proc -private get_community_id_not_cached {