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.14 -r1.29.2.15
--- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 28 Dec 2021 10:57:01 -0000 1.29.2.14
+++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 28 Dec 2021 11:23:13 -0000 1.29.2.15
@@ -3927,6 +3927,48 @@
return [ns_set array $set]
}
+ad_proc -deprecated ad_tcl_vars_to_ns_set {
+ -set_id
+ -put:boolean
+ args
+} {
+ Takes a list of variable names and ns_set update
s values in an ns_set
+ correspondingly: key is the name of the var, value is the value of
+ the var. The caller is (obviously) responsible for freeing the set if need be.
+
+ DEPRECATED: modern ns_set idioms allow to replace this proc with a
+ better oneliner in every case.
+
+ @see ns_set
+
+ @param set_id If this switch is specified, it'll use this set instead of
+ creating a new one.
+
+ @param put If this boolean switch is specified, it'll use ns_set put
instead
+ of ns_set update
(update is default)
+
+ @param args A number of variable names that will be transported into the ns_set.
+
+ @author Lars Pind (lars@pinds.com)
+
+} {
+ if { ![info exists set_id] } {
+ set set_id [ns_set create]
+ }
+
+ if { $put_p } {
+ set command put
+ } else {
+ set command update
+ }
+
+ foreach varname $args {
+ upvar $varname var
+ ns_set $command $set_id $varname $var
+ }
+ return $set_id
+}
+
# 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.112 -r1.189.2.113
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 28 Dec 2021 11:03:02 -0000 1.189.2.112
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 28 Dec 2021 11:23:13 -0000 1.189.2.113
@@ -2183,43 +2183,6 @@
}
}
-ad_proc -public ad_tcl_vars_to_ns_set {
- -set_id
- -put:boolean
- args
-} {
- Takes a list of variable names and ns_set update
s values in an ns_set
- correspondingly: key is the name of the var, value is the value of
- the var. The caller is (obviously) responsible for freeing the set if need be.
-
- @param set_id If this switch is specified, it'll use this set instead of
- creating a new one.
-
- @param put If this boolean switch is specified, it'll use ns_set put
instead
- of ns_set update
(update is default)
-
- @param args A number of variable names that will be transported into the ns_set.
-
- @author Lars Pind (lars@pinds.com)
-
-} {
- if { ![info exists set_id] } {
- set set_id [ns_set create]
- }
-
- if { $put_p } {
- set command put
- } else {
- set command update
- }
-
- foreach varname $args {
- upvar $varname var
- ns_set $command $set_id $varname $var
- }
- return $set_id
-}
-
ad_proc -public ad_tcl_vars_list_to_ns_set {
-set_id
-put:boolean