Fisheye: Tag 1.1.2.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.7.2.1 --- openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 10 Mar 2005 15:29:36 -0000 1.7 +++ openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 21 Jun 2005 21:22:12 -0000 1.7.2.1 @@ -162,3 +162,31 @@ fs::new_folder -name $name -pretty_name $pretty_name -parent_id $root -creation_user [ad_conn user_id] -creation_ip 127.0.0.1 } + + +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-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.48 -r1.48.2.1 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 10 Mar 2005 15:29:36 -0000 1.48 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 21 Jun 2005 21:22:12 -0000 1.48.2.1 @@ -272,6 +272,7 @@ {-creation_user ""} {-creation_ip ""} {-description ""} + -no_callback:boolean } { Create a new folder. @@ -282,6 +283,7 @@ @param creation_user Who created this folder @param creation_ip What is the ip address of the creation_user @param description of the folder. Not used in the current FS UI but might be used elsewhere. + @param no_callback defines if the callback should be called. Defaults to yes @return folder_id of the newly created folder } { if {[empty_string_p $creation_user]} { @@ -293,6 +295,9 @@ } set folder_id [db_exec_plsql new_folder {}] fs::set_folder_description -folder_id $folder_id -description $description + if {!$no_callback_p} { + callback fs::folder_new -package_id [ad_conn package_id] -folder_id $folder_id + } return $folder_id } @@ -655,6 +660,7 @@ {-creation_ip ""} {-title ""} {-description ""} + -no_callback:boolean } { Create a new file storage item or add a new revision if an item with the same name and parent folder already exists @@ -707,6 +713,10 @@ if {[string is true $do_notify_here_p]} { fs::do_notifications -folder_id $parent_id -filename $title -item_id $revision_id -action "new_file" -package_id $package_id } + + if {!$no_callback_p} { + callback fs::file_new -package_id $package_id -file_id $item_id + } } return $revision_id } Index: openacs-4/packages/file-storage/www/folder-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.tcl,v diff -u -r1.31 -r1.31.2.1 --- openacs-4/packages/file-storage/www/folder-chunk.tcl 25 Mar 2005 23:56:22 -0000 1.31 +++ openacs-4/packages/file-storage/www/folder-chunk.tcl 21 Jun 2005 21:22:13 -0000 1.31.2.1 @@ -118,8 +118,15 @@ link_url_col new_version_url] ] +set return_url [export_vars -base "index" {folder_id}] +set vars_to_export [list return_url] + if {$allow_bulk_actions} { set bulk_actions [list "Move" "move" "Move Checked Items to Another Folder" "Copy" "copy" "Copy Checked Items to Another Folder" "Delete" "delete" "Delete Checked Items"] + callback fs::folder_chunk::add_bulk_actions \ + -bulk_variable "bulk_actions" \ + -folder_id $folder_id \ + -var_export_list "vars_to_export" } else { set bulk_actions "" } @@ -128,8 +135,6 @@ set actions {} } -set return_url [export_vars -base "index" {folder_id}] -set vars_to_export [list return_url] template::list::create \ -name contents \