Index: openacs-4/packages/general-comments/tcl/general-comments-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/tcl/general-comments-procs-oracle.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/general-comments/tcl/general-comments-procs-oracle.xql 11 Jun 2018 15:08:10 -0000 1.10
@@ -0,0 +1,37 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ :1 := acs_message.new (
+ message_id => :comment_id,
+ title => :title,
+ mime_type => :comment_mime_type,
+ data => empty_blob(),
+ context_id => :context_id,
+ creation_user => :user_id,
+ creation_ip => :creation_ip,
+ is_live => :is_live,
+ rfc822_id => :rfc822_id
+ );
+ end;
+
+
+
+
+
+
+
+ update cr_revisions
+ set content = empty_blob()
+ where revision_id = :revision_id
+ returning content into :1
+
+
+
+
+
Index: openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql 11 Jun 2018 15:08:10 -0000 1.11
@@ -0,0 +1,39 @@
+
+
+
+ postgresql7.1
+
+
+
+ select acs_message__new (
+ :comment_id, -- 1 p_message_id
+ NULL, -- 2 p_reply_to
+ current_timestamp, -- 3 p_sent_date
+ NULL, -- 4 p_sender
+ :rfc822_id, -- 5 p_rfc822_id
+ :title, -- 6 p_title
+ NULL, -- 7 p_description
+ :comment_mime_type, -- 8 p_mime_type
+ NULL, -- 9 p_text
+ NULL, -- empty_blob(), -- 10 p_data
+ -4, -- 11 p_parent_id
+ :context_id, -- 12 p_context_id
+ :user_id, -- 13 p_creation_user
+ :creation_ip, -- 14 p_creation_ip
+ 'acs_message', -- 15 p_object_type
+ :is_live -- 16 p_is_live
+ )
+
+
+
+
+
+
+ update cr_revisions
+ set content = :content
+ where revision_id = :revision_id
+
+
+
+
+
Index: openacs-4/packages/general-comments/tcl/general-comments-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/tcl/general-comments-procs.tcl,v
diff -u -N -r1.25 -r1.26
--- openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 16 May 2018 11:56:59 -0000 1.25
+++ openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 11 Jun 2018 15:08:10 -0000 1.26
@@ -43,7 +43,8 @@
db_exec_plsql insert_comment {}
db_dml add_entry {}
- db_1row get_revision {}
+ set revision_id [content::item::get_latest_revision \
+ -item_id $comment_id]
db_dml set_content {} -blobs [list $content]
# Grant the user sufficient permissions to