Index: openacs-4/contrib/packages/general-comments/www/comment-add-edit-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/www/Attic/comment-add-edit-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/general-comments/www/comment-add-edit-oracle.xql 14 Jul 2003 01:39:34 -0000 1.1 @@ -0,0 +1,27 @@ + + + + + + + oracle8.1.6 + + + + + select g.comment_id, + g.related_object_id as object_id, + r.title, + r.content, + r.mime_type as comment_mime_type, + acs_object.name(g.related_object_id) as object_name + from general_comments g, + cr_revisions r + where g.comment_id = :comment_id and + r.revision_id = nvl(content_item.get_latest_revision(:comment_id),:revision_id) + + + + + + \ No newline at end of file Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/general-comments/www/comment-edit-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/general-comments/www/comment-edit-3-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/general-comments/www/comment-edit-3-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/general-comments/www/comment-edit-3.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/general-comments/www/comment-edit-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/general-comments/www/comment-edit-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/general-comments/www/url-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/www/Attic/url-add-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/general-comments/www/url-add-edit.tcl 3 Jul 2003 19:53:36 -0000 1.3 +++ openacs-4/contrib/packages/general-comments/www/url-add-edit.tcl 14 Jul 2003 01:39:34 -0000 1.4 @@ -76,7 +76,7 @@ #insert new extlink -# insert the url into database + # insert the url into database set creation_ip [ad_conn peeraddr] Index: openacs-4/contrib/packages/general-comments/www/view-comment-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/www/Attic/view-comment-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/general-comments/www/view-comment-oracle.xql 2 May 2003 15:50:44 -0000 1.1 +++ openacs-4/contrib/packages/general-comments/www/view-comment-oracle.xql 14 Jul 2003 01:39:34 -0000 1.2 @@ -15,7 +15,7 @@ - select g.object_id, + select g.related_object_id, g.comment_id, content_item.get_live_revision(g.comment_id) as live_revision, r.revision_id, @@ -39,7 +39,7 @@ - select g.object_id, + select g.related_object_id, g.comment_id, r.revision_id as live_revision, r.revision_id, Index: openacs-4/contrib/packages/general-comments/www/view-comment-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/www/Attic/view-comment-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/general-comments/www/view-comment-postgresql.xql 2 May 2003 15:50:44 -0000 1.1 +++ openacs-4/contrib/packages/general-comments/www/view-comment-postgresql.xql 14 Jul 2003 01:39:34 -0000 1.2 @@ -15,7 +15,7 @@ - select g.object_id, + select g.related_object_id as object_id, g.comment_id, content_item__get_live_revision(g.comment_id) as live_revision, r.revision_id, @@ -39,7 +39,7 @@ - select g.object_id, + select g.related_object_id as object_id, g.comment_id, r.revision_id as live_revision, r.revision_id, Index: openacs-4/contrib/packages/general-comments/www/view-comment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/www/Attic/view-comment.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/general-comments/www/view-comment.tcl 2 May 2003 15:50:44 -0000 1.1 +++ openacs-4/contrib/packages/general-comments/www/view-comment.tcl 14 Jul 2003 01:39:34 -0000 1.2 @@ -50,89 +50,30 @@ }] } # get revision data from the database - if { ![db_0or1row get_revision_comment { - 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 - }] } { + if { ![db_0or1row get_revision_comment {}] } { ad_return_complaint 1 "[_ general-comments.lt_The_comment_id_does_n]" } } else { # get live revision data from the database - if { ![db_0or1row get_comment { - 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) - }] } { + if { ![db_0or1row get_comment {}] } { ad_return_complaint 1 "[_ general-comments.lt_The_comment_id_does_n]" } } -db_multirow attachments get_attachments { - 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 -} +db_multirow attachments get_attachments {} -db_multirow links get_links { - 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 -} +db_multirow links get_links {} -db_multirow revisions get_revisions { - 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 -} +db_multirow revisions get_revisions {} set allow_file_p [ad_parameter AllowFileAttachmentsP {general-comments} {t}] set allow_link_p [ad_parameter AllowLinkAttachmentsP {general-comments} {t}] set allow_attach_p "t" if { $allow_file_p == "f" && $allow_link_p == "f" } { set allow_attach_p "f" } -set comment_on_id [db_string get_object_id "select object_id from general_comments where comment_id = :comment_id"] +set comment_on_id [db_string get_object_id ""] set page_title "[_ general-comments.View_comment_on]: [acs_object_name $comment_on_id]" set context "\"[_ general-comments.View_comment]\"" set return_url_view "[ad_urlencode view-comment?[export_ns_set_vars url]]" Index: openacs-4/contrib/packages/general-comments/www/view-comment.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/www/Attic/view-comment.xql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/general-comments/www/view-comment.xql 2 May 2003 15:50:44 -0000 1.1 +++ openacs-4/contrib/packages/general-comments/www/view-comment.xql 14 Jul 2003 01:39:34 -0000 1.2 @@ -33,7 +33,7 @@ - select object_id from general_comments where comment_id = :comment_id + select related_object_id from general_comments where comment_id = :comment_id