Index: openacs-4/packages/spam/www/spam-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/spam/www/spam-view.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/spam/www/spam-view.tcl 20 Apr 2001 20:51:25 -0000 1.1 +++ openacs-4/packages/spam/www/spam-view.tcl 4 Sep 2001 21:14:59 -0000 1.2 @@ -9,25 +9,32 @@ db_1row spam_get_message { select header_subject as title, to_char(send_date, 'Month DD, YYYY HH:MI:SS') as send_date, - content_object_id + content_item_id from spam_messages_all where spam_id = :spam_id } set html_text "" set plain_text "" -if [acs_mail_multipart_p $content_object_id] { - foreach type {plain html} { - db_1row spam_get_multipart_${type}_text " +if [acs_mail_multipart_p $content_item_id] { + + db_1row spam_get_multipart_plain_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' + and mime_type = 'text/plain' " - set ${type}_text $content - } + db_1row spam_get_multipart_html_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/plain' + " + + } else { db_1row spam_get_text { select content, mime_type