ben
committed
on 25 Feb 02
fixed up parameters
openacs-4/.../tcl/community-procs.tcl (+2 -2)
892 892         set chunk ""
893 893
894 894         if {[empty_string_p $user_id]} {
895 895             set user_id [ad_get_user_id]
896 896         }
897 897
898 898         foreach sc_id [get_subcomm_list -community_id $community_id] {
899 899
900 900             if {[has_subcommunity_p -community_id $sc_id] \
901 901                     && [member_p $sc_id $user_id]} {
902 902                 # only go down a level if user is a member of the sc
903 903                 set url [get_community_url $sc_id]
904 904                 append chunk "$pretext <a href=$url>[get_community_name $sc_id]</a>\n"
905 905
906 906                 if {[dotlrn::user_can_admin_community_p $sc_id]} {
907 907                     append chunk \
908 908                             "<small>\[<a href=${url}one-community-admin>admin</a>\]</small>"
909 909                 }
910 910
911 911                 append chunk \
912                           "<ul>\n[get_chunk -community_id $sc_id -user_id $user_id]</ul>\n"
  912                         "<ul>\n[get_subcomm_chunk -community_id $sc_id -user_id $user_id]</ul>\n"
913 913             } elseif { [not_closed_p -community_id $sc_id] \
914 914                     || [member_p $sc_id $user_id]} {
915 915                 # if the sc is not closed or i'm a member print it
916 916
917 917                 set url [get_community_url $sc_id]
918 918
919 919                 append chunk "$pretext <a href=$url>[get_community_name $sc_id]</a>\n"
920 920
921 921                 if {[not_closed_p -community_id $sc_id] \
922 922                     && ![member_p $sc_id $user_id]} {
923 923                     append chunk \
924 924                             "<small>\[<a href=${url}${join_target}>join</a>\]</small>"
925 925                 }
926 926
927 927                 if {[dotlrn::user_can_admin_community_p $sc_id]} {
928 928                     append chunk \
929 929                             "<small>\[<a href=${url}one-community-admin>admin</a>\]</small>"
930 930                 }
931 931
932 932