Index: openacs.org-dev/packages/forums/tcl/messages-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/tcl/messages-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs.org-dev/packages/forums/tcl/messages-procs.tcl 18 Jul 2002 13:41:55 -0000 1.2 +++ openacs.org-dev/packages/forums/tcl/messages-procs.tcl 25 Jul 2002 20:15:19 -0000 1.3 @@ -115,11 +115,13 @@ # Select the info into the upvar'ed Tcl Array upvar $array row - if {[forum::attachments_enabled_p]} { - db_1row select_message_with_attachment {} -column_array row - } else { - db_1row select_message {} -column_array row + set query select_message + + if {[ad_conn isconnected] && [forum::attachments_enabled_p]} { + set query select_message_with_attachment } + + db_1row $query {} -column_array row } ad_proc -private set_state {