Index: openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl,v diff -u -r1.13.2.1 -r1.13.2.2 --- openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl 29 Feb 2008 15:04:08 -0000 1.13.2.1 +++ openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl 5 Mar 2008 20:13:20 -0000 1.13.2.2 @@ -21,7 +21,7 @@ {-description ""} {-creation_user ""} {-creation_ip ""} - {-creation_date ""} + -creation_date {-context_id ""} {-package_id ""} } { @@ -56,31 +56,18 @@ @error } { - # FIXME or should this use package instantiate object which is a - # little smarter - - if {$parent_id != "-4" && [content::folder::is_registered -folder_id $parent_id -content_type "content_folder"] eq "f"} { - ns_log Error "-20000: This folder does not allow subfolders to be created" + set var_list [list] + foreach var [list folder_id name label description parent_id context_id package_id] { + lappend var_list [list $var [set $var]] } - - set folder_id [content::item::new -item_id $folder_id -name $name -parent_id $parent_id -content_type "content_folder" -item_subtype "content_folder" -package_id $package_id -context_id $context_id -creation_user $creation_user -creation_ip $creation_ip -creation_date $creation_date] - - # Insert the folder into cr_folders - db_dml insert_cr_folders "" - - # Update the object to have the label. This is done to prevent content::item::new from generating a revision - db_dml update_object_title "" - - # inherit the attributes of the parent folder - - if {$parent_id ne "" } { - - db_dml inherit_folder_type "" - - # update the child flag on the parent - db_dml update_parent_folder "" + if {[exists_and_not_null creation_date]} { + lappend var_list [list creation_date $creation_date] } - + set folder_id [package_instantiate_object \ + -creation_user $creation_user \ + -creation_ip $creation_ip \ + -var_list $var_list \ + $content_type] return $folder_id } Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/tcl/content-folder-procs.xql'. Fisheye: No comparison available. Pass `N' to diff?