Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v diff -u -r1.49.2.9 -r1.49.2.10 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 28 Dec 2021 14:07:42 -0000 1.49.2.9 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 28 Dec 2021 14:14:43 -0000 1.49.2.10 @@ -812,13 +812,11 @@ # now have the #...# notation for when there's no default value. # Will register the key in the message catalog if it doesn't exist. - set size [ns_set size $params] - for { set i 0 } { $i < $size } { incr i } { - set [ns_set key $params $i] [ns_set value $params $i] + foreach {key value} [ns_set array $params] { # substitute array variables - regsub {@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@} [set [ns_set key $params $i]] {${\1(\2)}} [ns_set key $params $i] + regsub {@([a-zA-Z0-9_]+)\.([a-zA-Z0-9_.]+)@} $value {${\1(\2)}} $key # substitute regular variables - regsub {@([a-zA-Z0-9_:]+)@} [set [ns_set key $params $i]] {${\1}} [ns_set key $params $i] + regsub {@([a-zA-Z0-9_:]+)@} $value {${\1}} $key } # And this needs to be executed at page execution time due to @@ -880,14 +878,9 @@ set sw "" set arg "" - set size [ns_set size $params] # get the switch flags and the switch var - - for { set i 0 } { $i < $size } { incr i } { - set key [ns_set key $params $i] - set value [ns_set value $params $i] - + foreach {key value} [ns_set array $params] { if {$key eq $value} { set arg $key } elseif {$key eq "flag"} { Index: openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl,v diff -u -r1.16.2.7 -r1.16.2.8 --- openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl 3 Oct 2021 17:15:15 -0000 1.16.2.7 +++ openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl 28 Dec 2021 14:18:14 -0000 1.16.2.8 @@ -165,9 +165,9 @@ set dbn_pools [list] set the_set [ns_configsection $config_path] if { $the_set ne "" } { - for {set i 0} {$i < [ns_set size $the_set]} {incr i} { - if { [string tolower [ns_set key $the_set $i]] == "availablepool" } { - lappend dbn_pools [ns_set value $the_set $i] + foreach {key value} [ns_set array $the_set] { + if { [string tolower $key] == "availablepool" } { + lappend dbn_pools $value } } }