xo::db::CrFolder instproc save_new (public)
<instance of xo::db::CrFolder> save_new \ [ -creation_user creation_user ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/cr-procs.tcl
Save a new CrFolder instance in the database.
- Switches:
- -creation_user (optional)
- Testcases:
- No testcase defined.
Source code: set package_id ${:package_id} [:info class] get_context package_id creation_user creation_ip set :folder_id [::acs::dc call content_folder new -name ${:name} -label [:label] -description [:description] -parent_id ${:parent_id} -package_id $package_id -creation_user $creation_user -creation_ip $creation_ip] #parent_s has_child_folders attribute could have become outdated if { [nsf::is object ::${:parent_id}] } { ::${:parent_id} set has_child_folders t } # well, obtaining the allowed content_types this way is not very # straightforward, but since we currently create these folders via # ad_forms, and we have no form variable, this should be at least # robust. if {[[self class] exists allowed_content_types]} { ::xo::db::CrFolder register_content_types -folder_id ${:folder_id} -content_types [[self class] set allowed_content_types] } ::xo::xotcl_object_cache flush ${:parent_id} return ${:folder_id}XQL Not present: Generic, PostgreSQL, Oracle