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.53 -r1.54
--- openacs-4/packages/file-storage/file-storage.info 12 Oct 2009 22:46:16 -0000 1.53
+++ openacs-4/packages/file-storage/file-storage.info 5 Dec 2009 02:08:14 -0000 1.54
@@ -16,7 +16,7 @@
0
#file-storage.file-storage#
-
+
@@ -26,6 +26,7 @@
+
Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql 26 May 2005 08:28:45 -0000 1.12
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql 5 Dec 2009 02:08:14 -0000 1.13
@@ -19,6 +19,7 @@
returns integer as '
declare
rec_root_folder record;
+ template_id integer;
begin
for rec_root_folder in
@@ -30,6 +31,11 @@
PERFORM apm_package__delete(rec_root_folder.package_id);
end loop;
+ -- Unregister the content template
+ template_id := content_type__get_template(''file_storage_object'',''public'');
+
+ perform content_type__unregister_template (''file_storage_object'', template_id, ''public'');
+ perform content_template__del(template_id);
return 0;
end;' language 'plpgsql';
@@ -44,6 +50,7 @@
drop trigger fs_root_folder_delete_trig on fs_root_folders;
drop function fs_root_folder_delete_trig();
+
select content_type__drop_type (
'file_storage_object', -- content_type
'f', -- drop_children_p
@@ -52,25 +59,11 @@
-- this data model added by file-storage patch number 146 from
-- openacs.org bugtracker
+
\i file-storage-notifications-drop.sql
--- this content type is created incorrectly tying the file_storage_root_folders
--- table to file_storage_object
--- so we drop these directly
+drop table fs_root_folders cascade;
-drop view file_storage_root_foldersi;
-drop view file_storage_root_foldersx;
+drop table fs_rss_subscrs;
-drop table fs_root_folders;
-
select drop_package('file_storage');
-
--- Unregister the content template
-select content_type__unregister_template (
- 'file-storage-object',
- content_type__get_template('file-storage-object','public'),
- 'public'
-);
-
--- Remove subtype of content_revision so that site-wide-search
--- can distinguish file-storage items in the search results
Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-notifications-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-notifications-drop.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-notifications-drop.sql 19 Jun 2004 14:47:48 -0000 1.1
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-notifications-drop.sql 5 Dec 2009 02:08:14 -0000 1.2
@@ -29,7 +29,7 @@
''fs_fs_notif_type'' -- impl_name
);
- PERFORM acs_sc_binding__delete (
+ perform acs_sc_binding__delete (
''NotificationType'',
''fs_fs_notif_type''
);
@@ -46,6 +46,11 @@
''ProcessReply'' -- impl_operation_name
);
+ perform acs_sc_impl__delete(
+ ''NotificationType'', -- impl_contract_name
+ ''fs_fs_notif_type'' -- impl_name
+ );
+
select into v_foo type_id
from notification_types
where sc_impl_id = impl_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.12 -r1.13
--- openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 8 Aug 2006 21:26:48 -0000 1.12
+++ openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 5 Dec 2009 02:08:14 -0000 1.13
@@ -25,6 +25,7 @@
} {
db_transaction {
unregister_implementation
+ fs::rss::drop_rss_gen_subscr_impl
}
}
@@ -51,7 +52,7 @@
{-package_id:required}
} {
} {
- # TODO: make this clean up the root folder
+ fs::delete_folder -folder_id [fs::get_root_folder -package_id $package_id] -no_notifications
}
ad_proc -private fs::install::register_implementation {
@@ -114,6 +115,8 @@
remove file-storage service contract implementation
} {
acs_sc::impl::delete -contract_name dav -impl_name file_storage_object
+ acs_sc::impl::delete -contract_name dav_mkcol_type -impl_name file-storage
+ acs_sc::impl::delete -contract_name dav_put_type -impl_name file-storage
}
ad_proc -private fs::install::upgrade {
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.66 -r1.67
--- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 9 Nov 2008 23:29:26 -0000 1.66
+++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 5 Dec 2009 02:08:14 -0000 1.67
@@ -1092,6 +1092,7 @@
{-cascade_p "t"}
{-parent_id ""}
-no_callback:boolean
+ -no_notifications:boolean
} {
Deletes a folder and all contents
} {
@@ -1108,8 +1109,9 @@
set version_name [get_object_name -object_id $folder_id]
db_exec_plsql delete_folder ""
- fs::do_notifications -folder_id $parent_id -filename $version_name -item_id $folder_id -action "delete_folder"
-
+ if { !$no_notifications_p } {
+ fs::do_notifications -folder_id $parent_id -filename $version_name -item_id $folder_id -action "delete_folder"
+ }
}
ad_proc fs::delete_version {
Index: openacs-4/packages/file-storage/tcl/file-storage-rss-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-rss-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/file-storage/tcl/file-storage-rss-procs.tcl 13 Jan 2005 13:58:12 -0000 1.2
+++ openacs-4/packages/file-storage/tcl/file-storage-rss-procs.tcl 5 Dec 2009 02:08:14 -0000 1.3
@@ -16,6 +16,14 @@
}]
}
+ad_proc -public fs::rss::drop_rss_gen_subscr_impl {} {
+ Unegister the service contract implementation and return the impl_id
+
+ @return impl_id of the created implementation
+} {
+ acs_sc::impl::delete -contract_name RssGenerationSubscriber -impl_name fs_rss
+}
+
ad_proc -private fs::rss::datasource {
summary_context_id
} {