Index: openacs-4/packages/dotlrn/www/one-community-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/one-community-type.tcl 6 Dec 2001 20:50:51 -0000 1.7 +++ openacs-4/packages/dotlrn/www/one-community-type.tcl 8 Dec 2001 01:22:40 -0000 1.8 @@ -1,13 +1,13 @@ ad_page_contract { Displays a community type - + @author Ben Adida (ben@openforce.net) + @author yon (yon@openforce.net) @creation-date 2001-10-04 -} { +} -query { +} -properties { } -ns_log notice "XXX0.6" - # Check that this is a community type if {[ad_parameter community_type_level_p] != 1} { ad_returnredirect "./" @@ -22,34 +22,6 @@ # Load some community type info db_1row select_community_type_info {} -# Check what communities of this type the user is a member of -# cause we want to display that! -set member_communities [dotlrn_community::get_communities_by_user $community_type $user_id] - -# Load all active communities for this community type -set list_of_active_communities [dotlrn_community::get_active_communities $community_type] - -# data source -template::multirow create active_communities community_id community_type pretty_name description url admin_p member_p - -# Loop and create the data source (I am very unhappy with db_multirow. VERY - bma) -foreach comm $list_of_active_communities { - # See if user can admin this - if {[dotlrn::user_can_admin_community_p [lindex $comm 0]]} { - set admin_p 1 - } else { - set admin_p 0 - } - - if {[lsearch [lindex $comm 0] $member_communities]} { - set member_p 1 - } else { - set member_p 0 - } - - template::multirow append active_communities [lindex $comm 0] [lindex $comm 1] [lindex $comm 2] [lindex $comm 3] [lindex $comm 4] $admin_p $member_p -} - set context_bar {View} ad_return_template