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.20.2.1 -r1.20.2.2 --- openacs-4/packages/acs-templating/tcl/util-procs.tcl 14 Aug 2005 19:59:17 -0000 1.20.2.1 +++ openacs-4/packages/acs-templating/tcl/util-procs.tcl 16 Sep 2005 09:42:29 -0000 1.20.2.2 @@ -732,29 +732,21 @@ } ad_proc -public template::util::tcl_to_sql_list { tcllist } { - Converts a TCL list to a list of values to insert in db_* SQL statements. For use with the SQL "in" statement + Convert a TCL list to a SQL list, for use with the "in" statement + why doesn't this use ns_dbquotevalue? } { - upvar __bind_array bind_array - set sql_segment "" - set list_pairs [list] - set ii 0 - if { [llength $tcllist] > 0 } { - foreach {list_item} $tcllist { - incr ii - lappend list_pairs $ii $list_item - lappend sql_segment ":__bind_array($ii)" - } - array set bind_array $list_pairs - return [join $sql_segment ,] + if { [llength $lst] > 0 } { + set sql "'" + append sql [join $lst "', '"] + append sql "'" + return $sql } else { - array set bind_array "" return "" } } - ad_proc -public template::get_resource_path {} { Get the template directory The body is doublequoted, so it is interpreted when this file is read