Index: openacs-4/packages/acs-subsite/tcl/group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-subsite/tcl/group-procs.tcl 4 Nov 2003 14:56:23 -0000 1.15 +++ openacs-4/packages/acs-subsite/tcl/group-procs.tcl 10 Nov 2003 12:35:39 -0000 1.16 @@ -359,36 +359,25 @@ If cascade is false, then the user must have specifically been granted membership on the group in question. } { - - if {[empty_string_p $user_id]} { - set user_id [ad_verify_and_get_user_id] + if { [empty_string_p $user_id] } { + set user_id [ad_conn user_id] } - if {[empty_string_p $group_name] && [empty_string_p $group_id]} { + if { [empty_string_p $group_name] && [empty_string_p $group_id] } { return 0 } - if {$cascade_p} { - set cascade t - } else { - set cascade f - } - - - if {![empty_string_p $group_name]} { - set group_id [db_string group_id_from_name " - select group_id from groups where group_name=:group_name" -default ""] - if {[empty_string_p $group_id]} { + if { ![empty_string_p $group_name] } { + set group_id [db_string group_id_from_name {} -default {}] + if { [empty_string_p $group_id] } { return 0 } } - set result [db_string user_is_member " - select acs_group.member_p(:user_id,:group_id, :cascade) - from dual" -default "f"] - - if { [string equal $result "f"] } { return 0 } - if { [string equal $result "t"] } { return 1 } + set cascade [db_boolean $cascade_p] + set result [db_string user_is_member {} -default "f"] + + return [template::util::is_true $result] } Index: openacs-4/packages/acs-subsite/tcl/group-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/Attic/group-procs.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/tcl/group-procs.xql 28 Aug 2003 09:41:39 -0000 1.3 +++ openacs-4/packages/acs-subsite/tcl/group-procs.xql 10 Nov 2003 12:35:39 -0000 1.4 @@ -33,7 +33,9 @@ - select group_id from groups where group_name=:group_name + select group_id + from groups + where group_name = :group_name