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.1 -r1.2
--- openacs-4/packages/download/tcl/download-procs-postgresql.xql 10 May 2001 20:51:30 -0000 1.1
+++ openacs-4/packages/download/tcl/download-procs-postgresql.xql 11 May 2001 05:20:45 -0000 1.2
@@ -33,33 +33,36 @@
- FIX ME LOB
-select content
+select '[cr_fs_path]' || content as content, storage_type
from cr_revisions
- where revision_id = $revision_id
+ where revision_id = :revision_id
- FIX ME PLSQL
declare
v_revision_id integer;
begin
v_revision_id := content_revision__new(
- item_id => :archive_id,
- title => :filename,
- description => :version_name,
- revision_id => :revision_id,
- mime_type => :mime_type,
- creation_user => :user_id,
- creation_ip => :creation_ip
- );
+ :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) values
(v_revision_id, :approved_p);
+ return v_revision_id;
end;
@@ -68,23 +71,22 @@
- FIX ME LOB
update cr_revisions
- set content = empty_blob()
+ set content = '[cr_create_content_file $item_id $revision_id $tmp_filename]'
where revision_id = :revision_id
- returning content into :1
- FIX ME PLSQL
begin
- content_item__set_live_revision(:revision_id);
+ content_item__set_live_revision(:revision_id);
+
+ return 0;
end;