content::folder::update (public)
content::folder::update -folder_id folder_id -attributes attributes
Defined in packages/acs-content-repository/tcl/content-folder-procs.tcl
Update standard cr_folder attributes, including the attributes for the folder cr_item
- Switches:
- -folder_id (required)
- folder to update
- -attributes (required)
- A list of pairs of additional attributes and their values to set. Each pair is a list of lists of two elements: key => value Valid attributes are: label, description, name, package_id
- Returns:
- Error:
- Author:
- Dave Bauer <dave@thedesignexperience.org>
- Created:
- 2004-06-04
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- content_folder
Source code: set valid_attributes [list label description package_id] set update_text "" foreach {attribute_list} $attributes { lassign $attribute_list attribute value if {$attribute in $valid_attributes} { # create local variable to use for binding set $attribute $value if {$update_text ne ""} { append update_text "," } append update_text " ${attribute} = :${attribute} " } } if {$update_text ne ""} { # we have valid attributes, update them set query_text "update cr_folders set ${update_text} where folder_id=:folder_id" db_dml item_update $query_text } # pass the rest of the attributes to content::item::update # we can just send the folder attributes because they don't overlap content::item::update -item_id $folder_id -attributes $attributesXQL Not present: Generic, PostgreSQL, Oracle