Index: openacs-4/packages/forums/tcl/messages-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/forums/tcl/messages-procs.tcl 3 Jun 2002 23:58:45 -0000 1.6 +++ openacs-4/packages/forums/tcl/messages-procs.tcl 2 Jul 2002 19:42:19 -0000 1.7 @@ -113,7 +113,12 @@ } { # Select the info into the upvar'ed Tcl Array upvar $array row - db_1row select_message {} -column_array row + + if {[forum::attachments_enabled_p]} { + db_1row select_message_with_attachment {} -column_array row + } else { + db_1row select_message {} -column_array row + } } ad_proc -private set_state { @@ -177,5 +182,18 @@ } { db_exec_plsql thread_open {} } + + ad_proc -public get_attachments { + {-message_id:required} + } { + get the attachments for a message + } { + # If attachments aren't enabled, then we stop + if {![forum::attachments_enabled_p]} { + return [list] + } + return [attachments::get_attachments -object_id $message_id] + } + }