Index: openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl,v diff -u -r1.60 -r1.61 --- openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 22 Jun 2002 20:11:03 -0000 1.60 +++ openacs-4/packages/dotlrn-calendar/tcl/dotlrn-calendar-procs.tcl 9 Jul 2002 20:18:15 -0000 1.61 @@ -133,6 +133,38 @@ -url [package_key] \ -directory_p "t"] + # mount attachments under calendar, if available + # attachments requires that dotlrn-fs is already mounted + if {[apm_package_registered_p attachments] + && [dotlrn_community::applet_active_p \ + -community_id $community_id \ + -applet_key [dotlrn_fs::applet_key]]} { + + set attachments_node_id [site_node::new \ + -name [attachments::get_url] \ + -parent_id [site_node::get_node_id_from_object_id \ + -object_id $package_id + ] + ] + + site_node::mount \ + -node_id $attachments_node_id \ + -object_id [apm_package_id_from_key attachments] + + set fs_package_id [dotlrn::get_community_applet_package_id \ + -community_id $community_id \ + -package_key [dotlrn_fs::package_key] + ] + + # map the fs root folder to the package_id of the new forums pkg + attachments::map_root_folder \ + -package_id $package_id \ + -folder_id [fs::get_root_folder -package_id $fs_package_id] + + } else { + ns_log Warning "DOTLRN-CALENDAR: Warning attachments or dotlrn-fs not found!" + } + # Here we create the calendar set calendar_id [calendar_create_helper -community_id $community_id -package_id $package_id]