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.43 -r1.44
--- openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 29 Sep 2005 18:54:09 -0000 1.43
+++ openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 8 Aug 2006 21:26:48 -0000 1.44
@@ -257,4 +257,118 @@
+
+
+ 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,
+ :package_id
+ )
+
+
+
+
+
+ select coalesce(title,name) as prettyname
+ from fs_objects
+ where object_id = :object_id
+
+