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 -r1.25.2.3 -r1.25.2.4 --- openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 23 Feb 2021 15:19:22 -0000 1.25.2.3 +++ openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 23 Feb 2021 16:18:41 -0000 1.25.2.4 @@ -78,6 +78,22 @@ return $revision_id } +ad_proc -public general_comments_delete_messages { + -package_id:required +} { + Deletes all comments belonging to specified package. +} { + foreach comment_id [db_list get_comments { + select comment_id + from general_comments c, + acs_objects o + where c.comment_id = o.object_id + and o.package_id = :package_id + }] { + content::item::delete -item_id $comment_id + } +} + ad_proc -public general_comments_get_comments { { -print_content_p 0 } { -print_attachments_p 0 }