Index: openacs-4/packages/acs-templating/tcl/deprecated-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/deprecated-procs.tcl,v diff -u -r1.8.2.4 -r1.8.2.5 --- openacs-4/packages/acs-templating/tcl/deprecated-procs.tcl 28 Dec 2021 16:15:50 -0000 1.8.2.4 +++ openacs-4/packages/acs-templating/tcl/deprecated-procs.tcl 28 Dec 2021 16:18:11 -0000 1.8.2.5 @@ -471,6 +471,35 @@ return $result } +ad_proc -deprecated template::util::set_to_vars { set args } { + Declare local variables for set values + + DEPRECATED: this proc can be replaced with trivial ns_set and + plain tcl idioms + + @see ns_set + + @param set A reference to an ns_set. + @param args Any number of keys to declare as local variables. +} { + + if { [llength $args] == 0 } { + + for { set i 0 } { $i < [ns_set size $set] } { incr i } { + set key [ns_set key $set $i] + upvar $key value + set value [ns_set get $set $key] + } + + } else { + + foreach key $args { + upvar $key value + set value [ns_set get $set $key] + } + } +} + # Local variables: # mode: tcl # tcl-indent-level: 4 Index: openacs-4/packages/acs-templating/tcl/util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/util-procs.tcl,v diff -u -r1.43.2.10 -r1.43.2.11 --- openacs-4/packages/acs-templating/tcl/util-procs.tcl 28 Dec 2021 16:15:50 -0000 1.43.2.10 +++ openacs-4/packages/acs-templating/tcl/util-procs.tcl 28 Dec 2021 16:18:11 -0000 1.43.2.11 @@ -217,30 +217,6 @@ set inlist [array get values] } -ad_proc -public template::util::set_to_vars { set args } { - Declare local variables for set values - - @param set A reference to an ns_set. - @param args Any number of keys to declare as local variables. -} { - - if { [llength $args] == 0 } { - - for { set i 0 } { $i < [ns_set size $set] } { incr i } { - set key [ns_set key $set $i] - upvar $key value - set value [ns_set get $set $key] - } - - } else { - - foreach key $args { - upvar $key value - set value [ns_set get $set $key] - } - } -} - ad_proc -public template::util::array_to_vars { arrayname } { Declare local variables for every key in an array.