Index: openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql,v
diff -u -r1.42 -r1.42.2.1
--- openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 1 Mar 2005 22:53:02 -0000 1.42
+++ openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 16 Aug 2005 11:05:23 -0000 1.42.2.1
@@ -256,4 +256,110 @@
+
+
+ select content_revision__new (
+ :title, -- title
+ :description, -- description
+ now(), -- publish_date
+ :mime_type, -- mime_type
+ null, -- ns_language
+ :content_body, -- text
+ :item_id, -- item_id
+ null,
+ now(), -- creation_date
+ :creation_user, -- creation_user
+ :creation_ip, -- creation_ip
+ null,
+ :package_id -- package_id
+ )
+
+
+
+
+
+ select content_revision__new (
+ :title, -- title
+ :description, -- description
+ now(), -- publish_date
+ :mime_type, -- mime_type
+ null, -- ns_language
+ :content_body, -- text
+ :item_id, -- item_id
+ null,
+ now(), -- creation_date
+ :creation_user, -- creation_user
+ :creation_ip, -- creation_ip
+ null,
+ :package_id -- package_id
+ )
+
+
+
+
+
+ select content_revision__new (
+ /* title => */ :title,
+ /* description => */ :description,
+ /* publish_date => */ current_timestamp,
+ /* mime_type => */ :mime_type,
+ /* nls_language => */ null,
+ /* data => */ null,
+ /* item_id => */ :item_id,
+ /* revision_id => */ :revision_id,
+ /* creation_date => */ current_timestamp,
+ /* creation_user => */ :creation_user,
+ /* creation_ip => */ :creation_ip,
+ /* package_id => */ :package_id
+ )
+
+
+
+
+
+
+ update cr_revisions
+ set mime_type = :mime_type,
+ lob = [set __lob_id [db_string get_lob_id "select empty_lob()"]]
+ where revision_id = :revision_id
+
+
+
+
+
+
+
+ update cr_revisions
+ set content_length = lob_length(lob)
+ where revision_id = :revision_id
+
+
+
+
+
+
+
+ begin
+ perform acs_object__update_last_modified
+ (:parent_id,:creation_user,:creation_ip);
+ perform
+ acs_object__update_last_modified(:item_id,:creation_user,:creation_ip);
+ return null;
+ end;
+
+
+
+
+
+ select file_storage__new_file (
+ :name,
+ :parent_id,
+ :creation_user,
+ :creation_ip,
+ :indbp,
+ :item_id
+ )
+
+
+