Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl,v diff -u -r1.1.2.8 -r1.1.2.9 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 14 Oct 2005 17:35:42 -0000 1.1.2.8 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 24 Oct 2005 11:17:06 -0000 1.1.2.9 @@ -83,3 +83,30 @@ fs_folder_copy -old_folder_id $object_id -new_parent_id $parent_id } + +ad_proc -public -callback fs::folder_new { + {-package_id:required} + {-folder_id:required} +} { +} + +ad_proc -public -callback pm::project_new -impl file_storage { + {-package_id:required} + {-project_id:required} +} { + create a new folder for each new project +} { + set pm_name [pm::project::name -project_item_id $project_id] + + foreach fs_package_id [application_link::get_linked -from_package_id $package_id -to_package_key "file-storage"] { + set root_folder_id [fs::get_root_folder -package_id $fs_package_id] + + set folder_id [fs::new_folder \ + -name $root_folder_id \ + -pretty_name $pm_name \ + -parent_id $root_folder_id \ + -no_callback] + + application_data_link::new -this_object_id $project_id -target_object_id $folder_id + } +} Index: openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl,v diff -u -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 21 Jun 2005 21:22:12 -0000 1.7.2.1 +++ openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 24 Oct 2005 11:17:06 -0000 1.7.2.2 @@ -164,29 +164,3 @@ } -ad_proc -public -callback fs::folder_new { - {-package_id:required} - {-folder_id:required} -} { -} - -ad_proc -public -callback pm::project_new -impl file_storage { - {-package_id:required} - {-project_id:required} -} { - create a new folder for each new project -} { - set pm_name [pm::project::name -project_item_id $project_id] - - foreach fs_package_id [application_link::get_linked -from_package_id $package_id -to_package_key "file-storage"] { - set root_folder_id [fs::get_root_folder -package_id $fs_package_id] - - set folder_id [fs::new_folder \ - -name $root_folder_id \ - -pretty_name $pm_name \ - -parent_id $root_folder_id \ - -no_callback] - - application_data_link::new -this_object_id $project_id -target_object_id $folder_id - } -}