Index: openacs-4/packages/spam/www/admin/spam-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/spam/www/admin/spam-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/spam/www/admin/spam-edit.tcl 20 Apr 2001 20:51:25 -0000 1.1 +++ openacs-4/packages/spam/www/admin/spam-edit.tcl 4 Sep 2001 21:14:59 -0000 1.2 @@ -18,7 +18,7 @@ select header_subject as title, to_char(send_date, 'yyyy-mm-dd') as send_date, to_char(send_date, 'hh24:mi:ss') as send_time, - sql_query, sent_p, content_object_id + sql_query, sent_p, content_item_id from spam_messages_all where spam_id = :spam_id } @@ -40,17 +40,23 @@ set html_text "" -if [acs_mail_multipart_p $content_object_id] { - foreach type {plain html} { - db_1row spam_get_multipart_${type}_text " - select content - from acs_mail_multipart_parts, acs_contents - where multipart_id = :content_object_id - and content_id = content_object_id - and mime_type = 'text/$type' +if [acs_mail_multipart_p $content_item_id] { + + db_1row spam_get_multipart_plain_text " + select cr.content as plain_text + from acs_mail_multipart_parts mpp + join cr_items ci on mpp.content_item_id=ci.item_id + join cr_revisions cr on ci.live_revision=cr.revision_id + where multipart_id=:content_item_id and cr.mime_type='text/plain'; " - set ${type}_text $content - } + db_1row spam_get_multipart_html_text " + select cr.content as html_text + from acs_mail_multipart_parts mpp + join cr_items ci on mpp.content_item_id=ci.item_id + join cr_revisions cr on ci.live_revision=cr.revision_id + where multipart_id=:content_item_id and cr.mime_type='text/html'; + " + } else { db_1row spam_get_text { select content, mime_type