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.2.3 -r1.4.2.4 --- openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl 24 Aug 2020 14:52:17 -0000 1.4.2.3 +++ openacs-4/packages/dotlrn-chat/tcl/dotlrn-chat-procs.tcl 29 Mar 2023 16:33:05 -0000 1.4.2.4 @@ -87,9 +87,9 @@ -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 } @@ -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 { @@ -151,19 +151,25 @@ 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 } { Index: openacs-4/packages/dotlrn-chat/tcl/test/dotlrn-chat-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-chat/tcl/test/Attic/dotlrn-chat-test-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/dotlrn-chat/tcl/test/dotlrn-chat-test-procs.tcl 25 Feb 2021 12:24:40 -0000 1.1.2.4 +++ openacs-4/packages/dotlrn-chat/tcl/test/dotlrn-chat-test-procs.tcl 29 Mar 2023 16:33:05 -0000 1.1.2.5 @@ -40,7 +40,6 @@ aa_register_case -procs { dotlrn_chat::add_applet dotlrn_chat::add_portlet - dotlrn_chat::add_portlet_helper dotlrn_chat::remove_portlet dotlrn_chat::remove_applet portal::exists_p @@ -103,16 +102,6 @@ ns_set put $args package_id 0 dotlrn_chat::remove_portlet $portal_id $args aa_equals "Number of portal elements after removal" "[portal_elements $portal_id]" "0" - # - # Add portlet to portal using directly the helper - # - dotlrn_chat::add_portlet_helper $portal_id $args - aa_equals "Number of portal elements after addition" "[portal_elements $portal_id]" "1" - # - # Remove applet - # - dotlrn_chat::remove_applet - aa_equals "Remove applet" "[dotlrn_applet::get_applet_id_from_key -applet_key [dotlrn_chat::applet_key]]" "" } else { aa_error "Portal creation failed" }