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.91 -r1.92
--- openacs-4/packages/dotlrn/tcl/community-procs.tcl 26 Mar 2002 21:52:05 -0000 1.91
+++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 27 Mar 2002 20:38:16 -0000 1.92
@@ -885,6 +885,7 @@
{-community_id:required}
{-pretext "
"}
{-join_target "register"}
+ {-only_member_p 0}
} {
Returns a html fragment of the subcommunity hierarchy of this
community or if none, the empty list.
@@ -919,15 +920,21 @@
}
append chunk \
- "\n[get_subcomm_chunk -community_id $sc_id -user_id $user_id]
\n"
+ "\n[get_subcomm_chunk -community_id $sc_id -user_id $user_id -only_member_p $only_member_p]
\n"
} elseif { [member_p $sc_id $user_id] \
|| [dotlrn::user_can_admin_community_p $sc_id] \
|| [not_closed_p -community_id $sc_id]} {
# Shows the subcomm if:
# 1. I'm a member of this subcomm OR
# 2. I'm have admin rights over the subcomm OR
# 3. The subcomm has an "open" OR "request" join policy
+ # but if the only_member_p flag is true, the user must be
+ # a member of the subcomm to see it.
+ if {$only_member_p && ![member_p $sc_id $user_id]} {
+ continue
+ }
+
set url [get_community_url $sc_id]
append chunk "$pretext [get_community_name $sc_id]\n"