Index: openacs-4/packages/download/tcl/download-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/tcl/download-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/tcl/download-procs-postgresql.xql 16 May 2001 09:41:05 -0000 1.4 +++ openacs-4/packages/download/tcl/download-procs-postgresql.xql 22 May 2001 04:18:16 -0000 1.5 @@ -4,90 +4,100 @@ postgresql7.1 - - - insert into download_downloads ( - download_id, - user_id, - revision_id, - download_date, - download_ip, - download_hostname, - user_agent, - reason_id, - reason) - values - (:download_id, - :user_id, - :revision_id, - current_timestamp, - :download_ip, - :download_hostname, - :user_agent, - :reason_id, - :reason_other) + + +insert into download_downloads ( + download_id, + user_id, + revision_id, + download_date, + download_ip, + download_hostname, + user_agent, + reason_id, + reason) +values ( + :download_id, + :user_id, + :revision_id, + current_timestamp, + :download_ip, + :download_hostname, + :user_agent, + :reason_id, + :reason_other) - + + - + + select '[cr_fs_path]' || content as content, storage_type - from cr_revisions r, cr_items i - where r.revision_id = :revision_id and - r.item_id = i.item_id - +from cr_revisions r, cr_items i +where r.revision_id = :revision_id and + r.item_id = i.item_id + + + - + - declare - v_revision_id integer; - begin - v_revision_id := content_revision__new( - :filename, - :version_name, - now(), - :mime_type, - null, - ' ', - :archive_id, - :revision_id, - now(), - :user_id, - :creation_ip - ); +declare + v_revision_id integer; +begin + v_revision_id := content_revision__new( + :filename, + :version_name, + now(), + :mime_type, + null, + ' ', + :archive_id, + :revision_id, + now(), + :user_id, + :creation_ip + ); - insert into download_archive_revisions (revision_id, approved_p, file_size) values - (v_revision_id, :approved_p, :file_size); - return v_revision_id; - end; + insert into download_archive_revisions + (revision_id, approved_p, file_size) + values + (v_revision_id, :approved_p, :file_size); + + return v_revision_id; +end; - + + - + - update cr_revisions - set content = '[cr_create_content_file $archive_id $revision_id $tmpfile]' - where revision_id = :revision_id +update cr_revisions +set content = '[cr_create_content_file $archive_id $revision_id $tmpfile]' +where revision_id = :revision_id - + + - + - select content_item__set_live_revision(:revision_id); +select content_item__set_live_revision( :revision_id ); - + +