Index: openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl,v diff -u -N -r1.4.2.3 -r1.4.2.4 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 9 Jan 2005 23:00:32 -0000 1.4.2.3 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 13 Jan 2005 01:27:07 -0000 1.4.2.4 @@ -60,7 +60,10 @@ @param creation_ip - @param attributes + @param attributes A list of pairs of additional attributes and + their values to pass to the constructor. Each pair is a list of two + elements: key => value such as + [list attribute value attribute value] @return @@ -93,15 +96,13 @@ lappend valid_attributes [lindex $type_attribute 2] } } - foreach attribute_pair $attributes { - set attribute_name [lindex $attribute_pair 0] - set attribute_value [lindex $attribute_pair 1] + foreach {attribute_name attribute_value} $attributes { if {[lsearch $valid_attributes $attribute_name] > -1} { + # first add the column name to the list + append attribute_names ", ${attribute_name}" # create local variable to use for binding - set $attribute_name $attribute_value - append attribute_names ", ${attribute_name}" append attribute_values ", :${attribute_name}" } }