Index: openacs-4/packages/dotlrn/www/deregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister.tcl,v diff -u -N -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/dotlrn/www/deregister.tcl 16 Dec 2019 17:14:38 -0000 1.14.2.1 +++ openacs-4/packages/dotlrn/www/deregister.tcl 22 Jul 2020 12:48:19 -0000 1.14.2.2 @@ -49,25 +49,25 @@ } foreach member_id $user_id { - + # This is catch most double clicks. # The catch will take care of cases where the double click is too fast. if {[dotlrn_community::member_p $community_id $member_id]} { - if {[catch { - dotlrn_community::remove_user $community_id $member_id - } errmsg]} { + if {[catch { + dotlrn_community::remove_user $community_id $member_id + } errmsg]} { - if {![dotlrn_community::member_p $community_id $user_id]} { - # assume this was a double click - ad_returnredirect $referer - ad_script_abort - } else { - ns_log Error "deregister.tcl failed: $errmsg" - util_return_headers - ad_return_error "[_ dotlrn.lt_Error_removing_user_c]" "[_ dotlrn.lt_An_error_occurred_whil_1]" - } - } + if {![dotlrn_community::member_p $community_id $user_id]} { + # assume this was a double click + ad_returnredirect $referer + ad_script_abort + } else { + ns_log Error "deregister.tcl failed: $errmsg" + util_return_headers + ad_return_error "[_ dotlrn.lt_Error_removing_user_c]" "[_ dotlrn.lt_An_error_occurred_whil_1]" + } + } } } Index: openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl,v diff -u -N -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl 16 Dec 2019 17:14:38 -0000 1.9.2.1 +++ openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl 22 Jul 2020 12:48:20 -0000 1.9.2.2 @@ -23,13 +23,13 @@ @cvs-id $Id$ } -query { source_community_id:integer - referer + referer } -properties { context_bar:onevalue } #Pages in this directory are only runnable by dotlrn-wide admins. -dotlrn::require_admin +dotlrn::require_admin set community_name [db_string select_community_info {}] set users [dotlrn_community::list_users $source_community_id] @@ -80,8 +80,8 @@ if {$community_id ne ""} { db_transaction { foreach user $users { - set user_id [ns_set get $user user_id] - if {![dotlrn_community::member_p $community_id $user_id]} { + set user_id [ns_set get $user user_id] + if {![dotlrn_community::member_p $community_id $user_id]} { # now we know user isn't an approved member of the new community if {![dotlrn_community::member_pending_p -community_id $community_id -user_id $user_id]} { @@ -105,7 +105,7 @@ # they are already there and awaiting approval, so just approve them. dotlrn_community::membership_approve -user_id $user_id -community_id $community_id } - } + } } } }