Index: openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl,v diff -u -r1.32 -r1.33 --- openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 2 Jun 2006 09:18:31 -0000 1.32 +++ openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 2 Jun 2006 09:56:23 -0000 1.33 @@ -811,7 +811,7 @@ set condition "phone_p is true" } } - set output_code "${party_id} in ( select party_id from contact_privacy where $condition )" + set output_code "${party_id} in ( select ${operand}${prefix}.party_id from contact_privacy ${operand}${prefix} where ${operand}${prefix}.$condition )" } } if { $request == "pretty" } { Index: openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql,v diff -u -r1.19 -r1.20 --- openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 2 Jun 2006 09:18:31 -0000 1.19 +++ openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 2 Jun 2006 09:56:23 -0000 1.20 @@ -45,8 +45,8 @@ insert into contact_privacy - ( party_id, nomail_p, noemail_p, nophone_p, gone_p ) - select party_id, 'f'::boolean, 'f'::boolean, 'f'::boolean, 'f'::boolean + ( party_id, email_p, mail_p, phone_p, gone_p ) + select party_id, 't'::boolean, 't'::boolean, 't'::boolean, 'f'::boolean from parties where party_id not in ( select party_id from contact_privacy )