Index: openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl 29 Jun 2018 17:27:19 -0000 1.4 +++ openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl 3 Sep 2024 15:37:37 -0000 1.5 @@ -14,7 +14,7 @@ # details. # -ad_library { +ad_library { Procs to set up the dotLRN chat applet @@ -25,7 +25,7 @@ } namespace eval dotlrn_chat { - + ad_proc -public applet_key { } { What's my applet key? @@ -63,7 +63,7 @@ ad_proc -public remove_applet { } { - One time destroy. + One time destroy. } { dotlrn_applet::remove_applet_from_dotlrn -applet_key [applet_key] } @@ -86,11 +86,11 @@ chat_admin_portlet::add_self_to_page \ -portal_id $admin_portal_id \ -package_id $package_id - - set args [ns_set create] - ns_set put $args package_id $package_id - add_portlet_helper $portal_id $args + chat_portlet::add_self_to_page \ + -portal_id $portal_id \ + -package_id $package_id + return $package_id } @@ -102,15 +102,15 @@ ad_return_complaint 1 "[applet_key] remove_applet_from_community not implemented!" } - ad_proc -public add_user { + ad_proc -private add_user { user_id } { one time user-specifuc init } { # noop } - ad_proc -public remove_user { + ad_proc -private remove_user { user_id } { } { @@ -127,10 +127,10 @@ set portal_id [dotlrn::get_portal_id -user_id $user_id] # use "append" here since we want to aggregate - set args [ns_set create] - ns_set put $args package_id $package_id - ns_set put $args param_action append - add_portlet_helper $portal_id $args + chat_portlet::add_self_to_page \ + -portal_id $portal_id \ + -package_id $package_id \ + -param_action append } ad_proc -public remove_user_from_community { @@ -147,23 +147,29 @@ remove_portlet $portal_id $args } - + ad_proc -public add_portlet { portal_id } { - A helper proc to add the underlying portlet to the given portal. - + A helper proc to add the underlying portlet to the given + portal. + + DEPRECATED: this proc is a trivial wrapper and does not + implement any service contract. Better to just invoke the api + inside directly. + + @see chat_portlet::add_self_to_page + @param portal_id } { # simple, no type specific stuff, just set some dummy values - - set args [ns_set create] - ns_set put $args package_id 0 - ns_set put $args param_action overwrite - add_portlet_helper $portal_id $args + chat_portlet::add_self_to_page \ + -portal_id $portal_id \ + -package_id 0 \ + -param_action overwrite } - ad_proc -public add_portlet_helper { + ad_proc -deprecated add_portlet_helper { portal_id args } { @@ -182,11 +188,11 @@ portal_id args } { - A helper proc to remove the underlying portlet from the given portal. - + A helper proc to remove the underlying portlet from the given portal. + @param portal_id @param args A list of key-value pairs (possibly user_id, community_id, and more) - } { + } { chat_portlet::remove_self_from_page \ -portal_id $portal_id \ -package_id [ns_set get $args package_id] @@ -209,14 +215,20 @@ return $new_package_id } - ad_proc -public change_event_handler { + ad_proc -private change_event_handler { community_id event old_value new_value - } { - listens for the following events: - } { - } + } { + listens for the following events: + } { + } } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: