Index: openacs-4/packages/file-storage/file-storage.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v
diff -u -r1.37 -r1.38
--- openacs-4/packages/file-storage/file-storage.info 24 Feb 2005 13:33:17 -0000 1.37
+++ openacs-4/packages/file-storage/file-storage.info 10 Mar 2005 15:29:35 -0000 1.38
@@ -24,6 +24,9 @@
+
+
+
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.6 -r1.7
--- openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 7 Mar 2005 15:32:12 -0000 1.6
+++ openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 10 Mar 2005 15:29:36 -0000 1.7
@@ -28,7 +28,32 @@
}
}
+ad_proc -private fs::install::after_instantiate {
+ {-package_id:required}
+} {
+} {
+ # using site_node name for root folder name
+ # doesn't work in the case that multiple instances of
+ # a node called "file-storage" for example, are mounted
+ # all file storage root folders have parent_id=0 and
+ # parent_id, name must be unique.
+ # this isn't a problem in resolving URLs because we know which
+ # root folder is associated with a site_node/package_id
+ set instance_name [apm_instance_name_from_id $package_id]
+ set folder_id [fs::new_root_folder \
+ -package_id $package_id \
+ -pretty_name $instance_name \
+ ]
+}
+
+ad_proc -private fs::install::before_uninstantiate {
+ {-package_id:required}
+} {
+} {
+ # TODO: make this clean up the root folder
+}
+
ad_proc -private fs::install::register_implementation {
} {
add file-storage repository service contract
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.47 -r1.48
--- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 1 Mar 2005 22:54:14 -0000 1.47
+++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 10 Mar 2005 15:29:36 -0000 1.48
@@ -186,33 +186,28 @@
namespace eval fs {}
-ad_proc -public fs::after_mount {
+ad_proc -private fs::after_mount {
-package_id
-node_id
} {
Create root folder for package instance
via tcl callback.
} {
- array set sn [site_node::get -node_id $node_id]
- regsub -all {/} $sn(name) {} name
- # using site_node name for root folder name
- # doesn't work in the case that multiple instances of
- # a node called "file-storage" for example, are mounted
- # all file storage root folders have parent_id=0 and
- # parent_id, name must be unique.
+ set folder_id [fs::get_root_folder -package_id $package_id]
- # this isn't a problem in resolving URLs because we know which
- # root folder is associated with a site_node/package_id
-
- set label $sn(instance_name)
+ oacs_dav::register_folder -enabled_p "t" $folder_id $node_id
+}
- set folder_id [fs::new_root_folder \
- -package_id $package_id \
- -pretty_name $label
- ]
+ad_proc -private fs::before_unmount {
+ -package_id
+ -node_id
+} {
+ Create root folder for package instance
+ via tcl callback.
+} {
+ set folder_id [fs::get_root_folder -package_id $package_id]
- oacs_dav::register_folder -enabled_p "t" $folder_id $sn(node_id)
-
+ oacs_dav::unregister_folder $folder_id $node_id
}
ad_proc -public fs::new_root_folder {
Index: openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql 17 May 2004 15:15:25 -0000 1.4
+++ openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql 10 Mar 2005 15:29:36 -0000 1.5
@@ -18,7 +18,7 @@
-
+
delete from dav_site_node_folder_map
where folder_id=:folder_id
@@ -120,4 +120,4 @@
-
\ No newline at end of file
+