Index: openacs-4/packages/general-comments/PORTING.status =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/PORTING.status,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/PORTING.status 28 May 2001 20:45:49 -0000 1.1 +++ openacs-4/packages/general-comments/PORTING.status 14 Jun 2001 19:52:22 -0000 1.2 @@ -2,11 +2,28 @@ Porting status notes for general-comments +General + +As of June 6, 2001 mostly done. You can add and administer comments. +* Delete does not seem to work [related to pg fk_ bug?] +* file attachements not yet ported: some BLOB issues in acs-messaging + are still pending, need to confer with OpenACS.org + +Tested with Postgresql and Oracle, sofar it seems to work. + +Notes + file:/packages/general-comments/tcl/general-comments-procs.tcl Moved most queries from variables to in-line for the QueryExtractor appended '_deprecated' to query-names in 'ad_proc -deprecated' functions. Left one duplicate -TODOs -In .../sql/pg/gc-drop.sql: +Other TODOs +In .../sql/[pg and oracle]/gc-drop.sql: Is the explicit deletion of image-attachments still required? + A: It seems not, commented out in Postgresql version. + Still todo: testing and Oracle + +Dates are hardcoded to MM-DD-YYYY format, need to move date handling +from SQL Tcl + Index: openacs-4/packages/general-comments/general-comments.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/general-comments.info,v diff -u -r1.2 -r1.3 --- openacs-4/packages/general-comments/general-comments.info 7 May 2001 19:31:03 -0000 1.2 +++ openacs-4/packages/general-comments/general-comments.info 14 Jun 2001 19:52:22 -0000 1.3 @@ -4,6 +4,7 @@ General Comments General Comments + f t @@ -26,23 +27,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -59,18 +84,28 @@ + + + + + + + + + + Index: openacs-4/packages/general-comments/sql/postgresql/general-comments-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/sql/postgresql/general-comments-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/general-comments/sql/postgresql/general-comments-create.sql 28 May 2001 20:44:03 -0000 1.2 +++ openacs-4/packages/general-comments/sql/postgresql/general-comments-create.sql 14 Jun 2001 19:52:22 -0000 1.3 @@ -2,6 +2,7 @@ -- packages/general-comments/sql/general-comments-create.sql -- -- @author Phong Nguyen (phong@arsdigita.com) +-- @author Pascal Scheffers (pascal@scheffers.net) -- @creation-date 2000-10-12 -- -- @cvs-id $Id$ Index: openacs-4/packages/general-comments/sql/postgresql/general-comments-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/sql/postgresql/general-comments-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/general-comments/sql/postgresql/general-comments-drop.sql 28 May 2001 20:44:03 -0000 1.2 +++ openacs-4/packages/general-comments/sql/postgresql/general-comments-drop.sql 14 Jun 2001 19:52:22 -0000 1.3 @@ -2,6 +2,7 @@ -- packages/general-comments/sql/general-comments-drop.sql -- -- @author Phong Nguyen phong@arsdigita.com +-- @author Pascal Scheffers (pascal@scheffers.net) -- @creation-date 2000-10-12 -- -- @cvs-id $Id$ @@ -33,10 +34,13 @@ -- referential integrity violations when deleting a content -- item that has an image attachment. This is a temporary fix -- until ACS 4.1 is released. + + /* delete from images where image_id in (select latest_revision from cr_items - where parent_id = comment_rec.comment_id); + where parent_id = comment_rec.comment_id); + */ perform acs_message__delete(comment_rec.comment_id); Index: openacs-4/packages/general-comments/www/comment-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-add-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/comment-add-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/comment-add-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Confirms a comment for an object_id @author Phong Nguyen + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/comment-add-3-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/comment-add-3-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-add-3-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,68 @@ + + + + oracle8.1.6 + + + + + begin + :1 := acs_message.new ( + message_id => :comment_id, + title => :title, + mime_type => :mime_type, + data => empty_blob(), + context_id => :context_id, + creation_user => :user_id, + creation_ip => :creation_ip, + is_live => :is_live + ); + end; + + + + + + + + + select content_item.get_latest_revision(:comment_id) as revision_id + from dual + + + + + + + + + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + + + + + + + + + begin + acs_permission.grant_permission ( + object_id => :comment_id, + grantee_id => :user_id, + privilege => 'read' + ); + acs_permission.grant_permission ( + object_id => :comment_id, + grantee_id => :user_id, + privilege => 'write' + ); + end; + + + + + + Index: openacs-4/packages/general-comments/www/comment-add-3-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/comment-add-3-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-add-3-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,81 @@ + + + + postgresql7.1 + + + + declare + v_message_id integer; + begin + 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 + NULL, -- 5 p_rfc822_id + :title, -- 6 p_title + NULL, -- 7 p_description + :mime_type, -- 8 p_mime_type + NULL, -- 9 p_text + NULL, -- empty_blob(), -- 10 p_data + 0, -- 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 + ) into v_message_id; + + return v_message_id; + + end; + + + + + + + + + select content_item__get_latest_revision(:comment_id) as revision_id + + + + + + + + + + update cr_revisions + set content = '$content' + where revision_id = :revision_id + + + + + + + + + begin + perform acs_permission__grant_permission ( + /* object_id => */ :comment_id, + /* grantee_id => */ :user_id, + /* privilege => */ 'read' + ); + perform acs_permission__grant_permission ( + /* object_id => */ :comment_id, + /* grantee_id => */ :user_id, + /* privilege => */ 'write' + ); + return 0; + end; + + + + + + + Index: openacs-4/packages/general-comments/www/comment-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-add-3.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/comment-add-3.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/comment-add-3.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Inserts a comment for object_id into the database @author Phong Nguyen + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { @@ -81,6 +82,7 @@ grantee_id => :user_id, privilege => 'write' ); + end; } } Index: openacs-4/packages/general-comments/www/comment-add-3.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/comment-add-3.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-add-3.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + + + insert into general_comments + (comment_id, + object_id, + category) + values + (:comment_id, + :object_id, + :category) + + + + + + Index: openacs-4/packages/general-comments/www/comment-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-add.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/comment-add.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/comment-add.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Displays a form for adding a commment to a page @author Phong Nguyen + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/comment-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/comment-edit-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/comment-edit-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -10,6 +10,7 @@ @param mime_type The type of format for the comment @author Phong Nguyen + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/comment-edit-3-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit-3-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-edit-3-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,47 @@ + + + + oracle8.1.6 + + + + + begin + :1 := acs_message.edit ( + message_id => :comment_id, + title => :title, + mime_type => :mime_type, + data => empty_blob(), + creation_user => :user_id, + creation_ip => :creation_ip, + is_live => :is_live + ); + end; + + + + + + + + + select content_item.get_latest_revision(:comment_id) as revision_id + from dual + + + + + + + + + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + + + + + + Index: openacs-4/packages/general-comments/www/comment-edit-3-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit-3-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-edit-3-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,52 @@ + + + + postgresql7.1 + + + + declare + v_revision_id integer; + begin + select acs_message__edit ( + /* message_id => */ :comment_id, + /* title => */ :title, + /* p_description */ NULL, + /* mime_type => */ :mime_type, + /* text */ NULL, + /* data => */ NULL, -- was empty_blob(), + /* creation_date */ now(), + /* creation_user => */ :user_id, + /* creation_ip => */ :creation_ip, + /* is_live => */ :is_live + ) into v_revision_id; + + return v_revision_id; + end; + + + + + + + + + select content_item__get_latest_revision(:comment_id) as revision_id + + + + + + + + + + update cr_revisions + set content = '$content' + where revision_id = :revision_id + + + + + + Index: openacs-4/packages/general-comments/www/comment-edit-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit-3.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/comment-edit-3.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/comment-edit-3.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Creates a new revision of a comment. @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/comment-edit-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-edit-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,13 @@ + + + + oracle8.1.6 + + + + select content_item.get_latest_revision(:comment_id) from dual + + + + + Index: openacs-4/packages/general-comments/www/comment-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-edit-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + select content_item__get_latest_revision(:comment_id) + + + + + Index: openacs-4/packages/general-comments/www/comment-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/comment-edit.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/comment-edit.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param comment_id The id of the comment to edit @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/comment-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/comment-edit.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/comment-edit.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + + + select g.object_id, + r.title, + r.content, + r.mime_type + from general_comments g, + cr_revisions r + where g.comment_id = :comment_id and + r.revision_id = :revision_id + + + + + + Index: openacs-4/packages/general-comments/www/delete-attachment-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/delete-attachment-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/delete-attachment-2-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,61 @@ + + + + oracle8.1.6 + + + + + select mime_type + from cr_revisions + where item_id = :attach_id + and revision_id = content_item.get_latest_revision (:attach_id) + + + + + + + + + delete from images + where image_id = content_item.get_latest_revision(:attach_id) + + + + + + + + + begin + acs_message.delete_image(:attach_id); + end; + + + + + + + + + begin + acs_message.delete_file(:attach_id); + end; + + + + + + + + + begin + content_extlink.delete(:attach_id); + end; + + + + + + Index: openacs-4/packages/general-comments/www/delete-attachment-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/delete-attachment-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/delete-attachment-2-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,66 @@ + + + + postgresql7.1 + + + + + select mime_type + from cr_revisions + where item_id = :attach_id + and revision_id = content_item__get_latest_revision (:attach_id) + + + + + + + + + delete from images + where image_id = content_item__get_latest_revision(:attach_id) + + + + + + + + FIX ME PLSQL +FIX ME PLSQL + + begin + acs_message__delete_image(:attach_id); + end; + + + + + + + + FIX ME PLSQL +FIX ME PLSQL + + begin + acs_message__delete_file(:attach_id); + end; + + + + + + + + + begin + perform content_extlink__delete(:attach_id); + return 0; + end; + + + + + + Index: openacs-4/packages/general-comments/www/delete-attachment-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/delete-attachment-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/delete-attachment-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/delete-attachment-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -8,6 +8,7 @@ @param submit Determines the action to take @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/delete-attachment-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/delete-attachment-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/delete-attachment-2.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + + select content_type + from cr_items + where item_id = :attach_id + + + + + + Index: openacs-4/packages/general-comments/www/delete-attachment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/delete-attachment.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/delete-attachment.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/delete-attachment.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -7,6 +7,7 @@ @param parent_id The id of the comment this attachment refers to @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/file-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-add-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/file-add-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/file-add-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -9,6 +9,7 @@ @param upload_file The name of the file @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-add.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/file-add.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/file-add.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param parent_id The id of the comment to attach to @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/file-download.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-download.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/file-download.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/file-download.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param item_id The id of the file attachment @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/file-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-edit-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/file-edit-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/file-edit-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -8,6 +8,7 @@ @param title The value of the new title @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/file-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/file-edit.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/file-edit.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -7,6 +7,7 @@ @param parent_id The id of the comment this attachment refers to @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/index-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,57 @@ + + + + oracle8.1.6 + + + + + select g.comment_id, + r.title, + acs_object.name(o.creation_user) as author, + o.creation_user, + decode(i.live_revision,null,0,1) as live_version_p, + decode(i.live_revision,r.revision_id,1,0) as approved_p, + to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date + from general_comments g, + cr_items i, + cr_revisions r, + acs_objects o + where g.comment_id = i.item_id and + r.revision_id = o.object_id and + r.revision_id = content_item.get_latest_revision(g.comment_id) and + o.creation_user = :user_id + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def] + + + + + + + + creation_date + 1 > sysdate + + + + + + + + creation_date + 7 > sysdate + + + + + + + + creation_date + 30 > sysdate + + + + + + + + Index: openacs-4/packages/general-comments/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/index-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,55 @@ + + + + postgresql7.1 + + + + + select g.comment_id, + r.title, + acs_object__name(o.creation_user) as author, + o.creation_user, + case when i.live_revision=null then 0 else 1 end as live_version_p, + case when i.live_revision=r.revision_id then 0 else 1 end as approved_p, + to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date + from general_comments g, + cr_items i, + cr_revisions r, + acs_objects o + where g.comment_id = i.item_id and + r.revision_id = o.object_id and + r.revision_id = content_item__get_latest_revision(g.comment_id) and + o.creation_user = :user_id + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def] + + + + + + + + + creation_date + '1 days'::interval > now() + + + + + + + + creation_date + '7 days'::interval > now() + + + + + + + + creation_date + '30 days'::interval > now() + + + + + Index: openacs-4/packages/general-comments/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/index.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/index.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ General comments main page @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { @@ -29,15 +30,15 @@ # dimensional slider definition set dimensional { {approval "Status" any { - {approved "approved" {where "i.live_revision is not null"} } - {unapproved "unapproved" {where "i.live_revision is null"} } + {approved "approved" {where "[db_map status_approved]"} } + {unapproved "unapproved" {where "[db_map status_unapproved]"} } {any "all" {} } } } {modified "Last Modified" 1m { - {1d "last 24 hours" {where "creation_date + 1 > sysdate"}} - {1w "last week" {where "creation_date + 7 > sysdate"}} - {1m "last month" {where "creation_date + 30 > sysdate"}} - {any "all" {}} + {1d "last 24 hours" {where "[db_map modified_last_24hours]"}} + {1w "last week" {where "[db_map modified_last_week]"}} + {1m "last month" {where "[db_map modified_last_month]"}} + {any "all" {} } } } } set dimensional_bar [ad_dimensional $dimensional] Index: openacs-4/packages/general-comments/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/index.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,21 @@ + + + + + + + i.live_revision is not null + + + + + + + + i.live_revision is null + + + + + + Index: openacs-4/packages/general-comments/www/test.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/test.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/test.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/test.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Test page for general-comments @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/url-add-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-add-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/url-add-2-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,25 @@ + + + + oracle8.1.6 + + + + + begin + :1 := content_extlink.new ( + name => :name, + url => :url, + label => :label, + parent_id => :parent_id, + extlink_id => :attach_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + + + + + + Index: openacs-4/packages/general-comments/www/url-add-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-add-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/url-add-2-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,31 @@ + + + + postgresql7.1 + + + + declare + v_extlink_id cr_extlinks.extlink_id%TYPE; + + begin + select content_extlink__new ( + /* name => */ :name, + /* url => */ :url, + /* label => */ :label, + /* description */ NULL, + /* parent_id => */ :parent_id, + /* extlink_id => */ :attach_id, + /* creation_date */ now(), + /* creation_user => */ :user_id, + /* creation_ip => */ :creation_ip + ) into v_extlink_id; + + return v_extlink_id; + end; + + + + + + Index: openacs-4/packages/general-comments/www/url-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-add-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/url-add-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/url-add-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Inserts a url for object_id into the database @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/url-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-add.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/url-add.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/url-add.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param parent_id The id of the comment to attach to @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/url-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-edit-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/url-edit-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/url-edit-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Creates a new revision of the url comment. @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/url-edit-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-edit-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/url-edit-2.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + update cr_extlinks + set label = :label, + url = :url + where extlink_id = :attach_id + + + + + + Index: openacs-4/packages/general-comments/www/url-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/url-edit.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/url-edit.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Edits a url comment @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/url-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/url-edit.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/url-edit.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + select label, + url + from cr_extlinks + where extlink_id = :attach_id + + + + + + Index: openacs-4/packages/general-comments/www/view-comment-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/view-comment-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/view-comment-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,79 @@ + + + + oracle8.1.6 + + + + + select content_item.get_latest_revision(:comment_id) from dual + + + + + + + + + select g.object_id, + g.comment_id, + content_item.get_live_revision(g.comment_id) as live_revision, + r.revision_id, + r.title, + r.content, + r.mime_type, + o.creation_user, + o.creation_date, + acs_object.name(o.creation_user) as author + from general_comments g, + cr_revisions r, + acs_objects o + where g.comment_id = o.object_id and + g.comment_id = r.item_id and + r.revision_id = :revision_id + + + + + + + + + select g.object_id, + g.comment_id, + r.revision_id as live_revision, + r.revision_id, + r.title, + r.content, + r.mime_type, + o.creation_user, + o.creation_date, + acs_object.name(o.creation_user) as author + from general_comments g, + acs_objects o, + cr_revisions r + where g.comment_id = :comment_id and + g.comment_id = o.object_id and + g.comment_id = r.item_id and + r.revision_id = content_item.get_live_revision(:comment_id) + + + + + + + + + select r.revision_id, + to_char(o.creation_date, 'MM-DD-YY HH24:MI:SS') as revision_date + from cr_revisions r, + acs_objects o + where r.item_id = :comment_id and + o.object_id = r.revision_id + order by o.creation_date desc + + + + + + Index: openacs-4/packages/general-comments/www/view-comment-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/view-comment-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/view-comment-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,79 @@ + + + + postgresql7.1 + + + + + select content_item__get_latest_revision(:comment_id) + + + + + + + + + select g.object_id, + g.comment_id, + content_item__get_live_revision(g.comment_id) as live_revision, + r.revision_id, + r.title, + r.content, + r.mime_type, + o.creation_user, + o.creation_date, + acs_object__name(o.creation_user) as author + from general_comments g, + cr_revisions r, + acs_objects o + where g.comment_id = o.object_id and + g.comment_id = r.item_id and + r.revision_id = :revision_id + + + + + + + + + select g.object_id, + g.comment_id, + r.revision_id as live_revision, + r.revision_id, + r.title, + r.content, + r.mime_type, + o.creation_user, + o.creation_date, + acs_object__name(o.creation_user) as author + from general_comments g, + acs_objects o, + cr_revisions r + where g.comment_id = :comment_id and + g.comment_id = o.object_id and + g.comment_id = r.item_id and + r.revision_id = content_item__get_live_revision(:comment_id) + + + + + + + + + select r.revision_id, + to_char(o.creation_date, 'MM-DD-YY HH24:MI:SS') as revision_date + from cr_revisions r, + acs_objects o + where r.item_id = :comment_id and + o.object_id = r.revision_id + order by o.creation_date desc + + + + + + Index: openacs-4/packages/general-comments/www/view-comment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/view-comment.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/view-comment.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/view-comment.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Views a comment @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/view-comment.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/view-comment.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/view-comment.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,41 @@ + + + + + + + select r.title, + r.mime_type, + i.name, + i.item_id + from cr_items i, + cr_revisions r + where i.parent_id = :comment_id and + r.revision_id = i.live_revision + + + + + + + + + select i.item_id, + e.label, + e.url + from cr_items i, cr_extlinks e + where i.parent_id = :comment_id and + e.extlink_id = i.item_id + + + + + + + + select object_id from general_comments where comment_id = :comment_id + + + + + Index: openacs-4/packages/general-comments/www/view-image.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/view-image.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/view-image.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/view-image.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ Views an attached image @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/admin/delete-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/delete-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/delete-2-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + + begin + acs_message.delete(:comment_id); + end; + + + + + + Index: openacs-4/packages/general-comments/www/admin/delete-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/delete-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/delete-2-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,18 @@ + + + + postgresql7.1 + + + + + begin + PERFORM acs_message__delete(:comment_id); + return 1; + end; + + + + + + Index: openacs-4/packages/general-comments/www/admin/delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/delete-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/admin/delete-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/admin/delete-2.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param comment_id The id of the comment to delete @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/admin/delete-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/delete-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/delete-2.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + delete from images + where image_id in (select latest_revision + from cr_items + where parent_id = :comment_id) + + + + + + Index: openacs-4/packages/general-comments/www/admin/delete-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/Attic/delete-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/delete-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,28 @@ + + + + oracle8.1.6 + + + + + select r.title, + r.content, + r.mime_type, + o.creation_user, + to_char(o.creation_date, 'MM-DD-YYYY') as pretty_date, + acs_object.name(o.creation_user) as author + from acs_objects o, + cr_revisions r, + general_comments g + where g.comment_id = :comment_id and + g.comment_id = o.object_id and + r.revision_id = content_item.get_latest_revision(g.comment_id) + + + + + + + + Index: openacs-4/packages/general-comments/www/admin/delete-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/Attic/delete-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/delete-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,26 @@ + + + + postgresql7.1 + + + + + + select r.title, + r.content, + r.mime_type, + o.creation_user, + to_char(o.creation_date, 'MM-DD-YYYY') as pretty_date, + acs_object__name(o.creation_user) as author + from acs_objects o, + cr_revisions r, + general_comments g + where g.comment_id = :comment_id and + g.comment_id = o.object_id and + r.revision_id = content_item__get_latest_revision(g.comment_id) + + + + + Index: openacs-4/packages/general-comments/www/admin/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/admin/delete.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/admin/delete.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param comment_id The id of the comment to delete @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { Index: openacs-4/packages/general-comments/www/admin/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/Attic/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/index-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,55 @@ + + + + oracle8.1.6 + + + + + select g.comment_id, + r.title, + acs_object.name(o.creation_user) as author, + o.creation_user, + case when i.live_revision = null then 0 else 1 end as live_version_p, + case when i.live_revision = r.revision_id then 1 else 0 end as approved_p, + to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date + from general_comments g, + cr_items i, + cr_revisions r, + acs_objects o + where g.comment_id = i.item_id and + r.revision_id = o.object_id and + r.revision_id = content_item.get_latest_revision(g.comment_id) + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def] + + + + + + + creation_date + 1 > sysdate + + + + + + + + creation_date + 7 > sysdate + + + + + + + + creation_date + 30 > sysdate + + + + + + + + Index: openacs-4/packages/general-comments/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/Attic/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/index-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,54 @@ + + + + postgresql7.1 + + + + + select g.comment_id, + r.title, + acs_object__name(o.creation_user) as author, + o.creation_user, + case when i.live_revision = null then 0 else 1 end as live_version_p, + case when i.live_revision = r.revision_id then 1 else 0 end as approved_p, + to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date + from general_comments g, + cr_items i, + cr_revisions r, + acs_objects o + where g.comment_id = i.item_id and + r.revision_id = o.object_id and + r.revision_id = content_item__get_latest_revision(g.comment_id) + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def] + + + + + + + + + creation_date + '1 days'::interval > now() + + + + + + + + creation_date + '7 days'::interval > now() + + + + + + + + creation_date + '30 days'::interval > now() + + + + + Index: openacs-4/packages/general-comments/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/admin/index.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/admin/index.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -4,6 +4,7 @@ General comments administration main page @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } { @@ -22,15 +23,15 @@ # dimensional slider definition set dimensional { {approval "Status" unapproved { - {approved "approved" {where "i.live_revision is not null"} } - {unapproved "unapproved" {where "i.live_revision is null"} } + {approved "approved" {where "[db_map status_approved]"} } + {unapproved "unapproved" {where "[db_map status_unapproved]"} } {any "all" {} } } } {modified "Last Modified" any { - {1d "last 24 hours" {where "creation_date + 1 > sysdate"}} - {1w "last week" {where "creation_date + 7 > sysdate"}} - {1m "last month" {where "creation_date + 30 > sysdate"}} - {any "all" {}} + {1d "last 24 hours" {where "[db_map modified_last_24hours]"}} + {1w "last week" {where "[db_map modified_last_week]"}} + {1m "last month" {where "[db_map modified_last_month]"}} + {any "all" {} } } } } set dimensional_bar [ad_dimensional $dimensional] @@ -77,8 +78,9 @@ # create the table to display the comments set extra_var_list [list return_url $return_url] + set comments_table [ad_table -Torderby $orderby \ - -Tmissing_text {No comments available} \ + -Tmissing_text {No comments available} \ -Textra_vars $extra_var_list \ comments_select $sql $table_def] Index: openacs-4/packages/general-comments/www/admin/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/index.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,29 @@ + + + + + + + i.live_revision is not null + + + + + + + + i.live_revision is null + + + + + + + + 1 = 1 + + + + + + Index: openacs-4/packages/general-comments/www/admin/toggle-approval-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/toggle-approval-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/toggle-approval-oracle.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,42 @@ + + + + oracle8.1.6 + + + + select content_item.get_live_revision(:comment_id) from dual + + + + + + + select content_item.get_latest_revision(:comment_id) from dual + + + + + + + + begin + content_item.set_live_revision(:revision_id); + end; + + + + + + + + + begin + content_item.unset_live_revision(:comment_id); + end; + + + + + + Index: openacs-4/packages/general-comments/www/admin/toggle-approval-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/toggle-approval-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/general-comments/www/admin/toggle-approval-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 @@ -0,0 +1,44 @@ + + + + postgresql7.1 + + + + select content_item__get_live_revision(:comment_id) + + + + + + + select content_item__get_latest_revision(:comment_id) + + + + + + + + begin + PERFORM content_item__set_live_revision(:revision_id); + return 0; + end; + + + + + + + + + begin + PERFORM content_item__unset_live_revision(:comment_id); + return 0; + end; + + + + + + Index: openacs-4/packages/general-comments/www/admin/toggle-approval.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/toggle-approval.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/admin/toggle-approval.tcl 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/packages/general-comments/www/admin/toggle-approval.tcl 14 Jun 2001 19:52:22 -0000 1.2 @@ -6,6 +6,7 @@ @param comment_id The id of the comment @author Phong Nguyen (phong@arsdigita.com) + @author Pascal Scheffers (pascal@scheffers.net) @creation-date 2000-10-12 @cvs-id $Id$ } {