Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl,v diff -u -r1.7.2.5 -r1.7.2.6 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 9 Jan 2005 21:59:52 -0000 1.7.2.5 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 13 Jan 2005 23:39:19 -0000 1.7.2.6 @@ -62,10 +62,10 @@ @param title - title of content_revision to be created @param description of content_revision to be created @param text - text of content revision to be created - @param attributes - A list of pairs of additional attributes and + @param attributes - A list of lists ofpairs 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] + [list [list attribute value] [list attribute value]] @return item_id of the new content item 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 -r1.4.2.4 -r1.4.2.5 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 13 Jan 2005 01:27:07 -0000 1.4.2.4 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 13 Jan 2005 23:39:19 -0000 1.4.2.5 @@ -60,10 +60,10 @@ @param creation_ip - @param attributes A list of pairs of additional attributes and + @param attributes A list of lists 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] + [list [list attribute value] [list attribute value]] @return @@ -96,7 +96,8 @@ lappend valid_attributes [lindex $type_attribute 2] } } - foreach {attribute_name attribute_value} $attributes { + foreach attribute_pair $attributes { + foreach {attribute_name attribute_value} $attribute_pair {break} if {[lsearch $valid_attributes $attribute_name] > -1} { # first add the column name to the list Index: openacs-4/packages/acs-content-repository/tcl/test/content-item-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/test/content-item-test-procs.tcl,v diff -u -r1.2.2.8 -r1.2.2.9 --- openacs-4/packages/acs-content-repository/tcl/test/content-item-test-procs.tcl 13 Jan 2005 01:27:07 -0000 1.2.2.8 +++ openacs-4/packages/acs-content-repository/tcl/test/content-item-test-procs.tcl 13 Jan 2005 23:39:19 -0000 1.2.2.9 @@ -56,7 +56,7 @@ -name "$test_name" \ -item_id $first_item_id \ -parent_id $first_folder_id \ - -attributes [list title "$test_name"] + -attributes [list [list title "$test_name"]] ] aa_true "First item created" [expr $first_item_id == $returned_first_item_id] @@ -86,7 +86,7 @@ -name "${evil_test_name}" \ -item_id $evil_item_id \ -parent_id $first_folder_id \ - -attributes [list title "${evil_test_name}"] + -attributes [list [list title "${evil_test_name}"]] ] aa_true "Evil_name item created" [expr $evil_item_id == $returned_evil_item_id] @@ -156,7 +156,7 @@ -item_id $new_type_item_id \ -parent_id $first_folder_id \ -content_type "__test_type" \ - -attributes [list title "Title" attribute_name "attribute_value"]] + -attributes [list [list title "Title"] [list attribute_name "attribute_value"]]] ######################################################### # check that the item exists