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.234.2.16 -r1.234.2.17 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 8 Feb 2021 11:00:39 -0000 1.234.2.16 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 17 Feb 2021 18:43:02 -0000 1.234.2.17 @@ -1081,14 +1081,16 @@ {-url ""} } { Returns the community from a URL. + + @param url if no URL specified, the function will break when + called without connection } { if {$url eq ""} { set url [ad_conn url] } - set package_id [site_node::closest_ancestor_package -include_self -url $url -package_key dotlrn] - - return [get_community_id -package_id $package_id] + + return [expr {$package_id eq "" ? "" : [get_community_id -package_id $package_id]}] } ad_proc -public get_community_id {