Index: openacs-4/packages/dotlrn/www/spam.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam.tcl,v diff -u -r1.21.6.6 -r1.21.6.7 --- openacs-4/packages/dotlrn/www/spam.tcl 8 Aug 2004 05:56:05 -0000 1.21.6.6 +++ openacs-4/packages/dotlrn/www/spam.tcl 11 Aug 2004 22:45:06 -0000 1.21.6.7 @@ -164,10 +164,16 @@ set recipients_str '' } + if {![string equal $rel_types_str ''] && [string equal $recipients_str ''] } { + set query_restriction "and acs_rels.rel_type in ('$rel_types_str')" + } elseif {[string equal $rel_types_str ''] && ![string equal $recipients_str ''] } { + set query_restriction "and acs_rels.object_id_two in ($recipients_str)" + } elseif {![string equal $rel_types_str ''] && ![string equal $recipients_str ''] } { + set query_restriction "and (acs_rels.rel_type in ('$rel_types_str') or acs_rels.object_id_two in ($recipients_str))" + } set query [db_map sender_info] - if {$format == "html"} { set message "$message" set message_type "html"