Index: openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl,v diff -u -N -r1.29.2.16 -r1.29.2.17 --- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 28 Dec 2021 11:25:40 -0000 1.29.2.16 +++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 28 Dec 2021 11:40:24 -0000 1.29.2.17 @@ -4009,6 +4009,25 @@ return $set_id } +ad_proc -deprecated oacs_util::vars_to_ns_set { + {-ns_set:required} + {-var_list:required} +} { + Does an ns_set put on each variable named in var_list + + DEPRECATED: modern ns_set idioms make this proc obsolete + + @see ns_set + + @param var_list list of variable names in the calling scope + @param ns_set an ns_set id that already exists. +} { + foreach var $var_list { + upvar $var one_var + ns_set put $ns_set $var $one_var + } +} + # Local variables: # mode: tcl # tcl-indent-level: 4 Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.189.2.114 -r1.189.2.115 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 28 Dec 2021 11:25:40 -0000 1.189.2.114 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 28 Dec 2021 11:40:24 -0000 1.189.2.115 @@ -1222,21 +1222,6 @@ } } -ad_proc -public oacs_util::vars_to_ns_set { - {-ns_set:required} - {-var_list:required} -} { - Does an ns_set put on each variable named in var_list - - @param var_list list of variable names in the calling scope - @param ns_set an ns_set id that already exists. -} { - foreach var $var_list { - upvar $var one_var - ns_set put $ns_set $var $one_var - } -} - ad_proc -private util_WriteWithExtraOutputHeaders { headers_so_far {first_part_of_page ""} Index: openacs-4/packages/calendar/tcl/calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs.tcl,v diff -u -N -r1.39.2.3 -r1.39.2.4 --- openacs-4/packages/calendar/tcl/calendar-procs.tcl 1 Apr 2021 08:42:35 -0000 1.39.2.3 +++ openacs-4/packages/calendar/tcl/calendar-procs.tcl 28 Dec 2021 11:40:24 -0000 1.39.2.4 @@ -368,9 +368,12 @@ if { $package_id eq "" } { set package_id [ad_conn package_id] } - set extra_vars [ns_set create] - set context_id $package_id - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {owner_id private_p calendar_name package_id context_id} + set extra_vars [ns_set create s \ + owner_id $owner_id \ + private_p $private_p \ + calendar_name $calendar_name \ + package_id $package_id \ + context_id $package_id] set calendar_id [package_instantiate_object -extra_vars $extra_vars calendar] Index: openacs-4/packages/notifications/tcl/delivery-method-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/delivery-method-procs.tcl,v diff -u -N -r1.16.2.1 -r1.16.2.2 --- openacs-4/packages/notifications/tcl/delivery-method-procs.tcl 6 Mar 2021 19:36:36 -0000 1.16.2.1 +++ openacs-4/packages/notifications/tcl/delivery-method-procs.tcl 28 Dec 2021 11:40:24 -0000 1.16.2.2 @@ -85,12 +85,13 @@ } { Register a new delivery method with the notification service. } { - set extra_vars [ns_set create] + set extra_vars [ns_set create s \ + delivery_method_id $delivery_method_id \ + sc_impl_id $sc_impl_id \ + short_name $short_name \ + pretty_name $pretty_name \ + ] - oacs_util::vars_to_ns_set \ - -ns_set $extra_vars \ - -var_list {delivery_method_id sc_impl_id short_name pretty_name} - return [package_instantiate_object \ -extra_vars $extra_vars \ "notification_delivery_method"] Index: openacs-4/packages/notifications/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v diff -u -N -r1.23.2.3 -r1.23.2.4 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 21 Jul 2020 14:03:49 -0000 1.23.2.3 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 28 Dec 2021 11:40:24 -0000 1.23.2.4 @@ -313,15 +313,20 @@ set notif_subject [ad_string_truncate -len 100 -- $notif_subject] # Set up the vars - set extra_vars [ns_set create] - oacs_util::vars_to_ns_set \ - -ns_set $extra_vars \ - -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html notif_user file_ids} + set extra_vars [ns_set create s \ + notification_id $notification_id \ + type_id $type_id \ + object_id $object_id \ + response_id $response_id \ + notif_subject $notif_subject \ + notif_text $notif_text \ + notif_html $notif_html \ + notif_user $notif_user\ + file_ids $file_ids \ + ] if { $notif_date ne "" } { - oacs_util::vars_to_ns_set \ - -ns_set $extra_vars \ - -var_list {notif_date} + ns_set put $extra_vars notif_date $notif_date } # Create the notification Index: openacs-4/packages/notifications/tcl/notification-reply-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-reply-procs.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/notifications/tcl/notification-reply-procs.tcl 7 Aug 2017 23:48:13 -0000 1.6 +++ openacs-4/packages/notifications/tcl/notification-reply-procs.tcl 28 Dec 2021 11:40:24 -0000 1.6.2.1 @@ -24,13 +24,19 @@ } { store a new reply } { - set extra_vars [ns_set create] - # Truncate subject to 100 chars, which is the limit in the data model (for some obscure reason) set subject [string range $subject 0 99] - - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {reply_id object_id type_id from_user subject content reply_date} - + + set extra_vars [ns_set create s \ + reply_id $reply_id \ + object_id $object_id \ + type_id $type_id \ + from_user $from_user \ + subject $subject \ + content $content \ + reply_date $reply_date \ + ] + set reply_id [package_instantiate_object -extra_vars $extra_vars notification_reply] return $reply_id Index: openacs-4/packages/notifications/tcl/notification-request-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.tcl,v diff -u -N -r1.14 -r1.14.2.1 --- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 3 Oct 2018 09:17:22 -0000 1.14 +++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 28 Dec 2021 11:40:24 -0000 1.14.2.1 @@ -30,10 +30,16 @@ if {$request_id eq ""} { # Set up the vars - set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list { - request_id type_id user_id object_id interval_id delivery_method_id format dynamic_p - } + set extra_vars [ns_set create s \ + request_id $request_id \ + type_id $type_id \ + user_id $user_id \ + object_id $object_id \ + interval_id $interval_id \ + delivery_method_id $delivery_method_id \ + format $format \ + dynamic_p $dynamic_p \ + ] # Create the request set request_id [package_instantiate_object -extra_vars $extra_vars notification_request] Index: openacs-4/packages/notifications/tcl/notification-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-type-procs.tcl,v diff -u -N -r1.16.2.2 -r1.16.2.3 --- openacs-4/packages/notifications/tcl/notification-type-procs.tcl 18 May 2020 21:20:20 -0000 1.16.2.2 +++ openacs-4/packages/notifications/tcl/notification-type-procs.tcl 28 Dec 2021 11:40:24 -0000 1.16.2.3 @@ -33,8 +33,13 @@ } { create a new notification type. Must provide a service contract implementation ID. } { - set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {type_id sc_impl_id short_name pretty_name description} + set extra_vars [ns_set create s \ + type_id $type_id \ + sc_impl_id $sc_impl_id \ + short_name $short_name \ + pretty_name $pretty_name \ + description $description \ + ] set type_id [package_instantiate_object -extra_vars $extra_vars notification_type]