Index: openacs-4/packages/file-storage/www/version-add-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/version-add-2-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/file-storage/www/version-add-2-postgresql.xql 25 Aug 2001 00:36:50 -0000 1.2 +++ openacs-4/packages/file-storage/www/version-add-2-postgresql.xql 22 Sep 2001 05:57:43 -0000 1.3 @@ -3,45 +3,55 @@ postgresql7.1 - + - select content_revision__new ( - :name, -- title - :description, -- description - now(), -- publish_date (default) - :mime_type, -- mime_type - null, -- nls_language (default) - null, -- data (default) - :file_id, -- item_id - null, -- rvision_id (default) - now(), -- creation_date (default) - :user_id, -- creation_user - :ip_addr -- creation_ip - ); + select file_storage__new_version ( + :filename, -- filename + :description, -- description + :mime_type, -- mime_type + :file_id, -- item_id + :user_id, -- creation_user + :creation_ip -- creation_ip + ); - + - - + + update cr_revisions set lob = [set __lob_id [db_string get_lob_id "select empty_lob()"]] - where revision_id = :revision_id + where revision_id = :version_id - + - - + - select content_item__set_live_revision(:revision_id); + update cr_revisions + set content_length = lob_length(lob) + where revision_id = :version_id - + - + + + + + + update cr_revisions + set content = '$tmp_filename', + content_length = $tmp_size + where revision_id = :version_id + + + + + +