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.3 -r1.4 --- openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 28 Jun 2005 18:11:47 -0000 1.3 +++ openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 15 Jul 2005 01:44:31 -0000 1.4 @@ -135,15 +135,18 @@ [list "[_ contacts.country_code_is_-]" "country_code_equals"] \ [list "[_ contacts.lt_country_code_is_not_-]" "not_country_code_equals"] \ ] - - lappend var_elements [list ${var1}:integer(text) [list label {}] [list html [list size 3 maxlength 3]]] + if { [exists_and_not_null operand] } { + lappend var_elements [list ${var1}:integer(text) [list label {}] [list html [list size 3 maxlength 3]]] + } } ams_value__text { set operand_options [list \ [list "[_ contacts.contains_-]" "contains"] \ [list "[_ contacts.does_not_contain_-]" "not_contains"] \ ] - lappend var_elements [list ${var1}:text(text) [list label {}]] + if { [exists_and_not_null operand] } { + lappend var_elements [list ${var1}:text(text) [list label {}]] + } } ams_value__postal_address { set operand_options [list \ @@ -170,8 +173,9 @@ [list "[_ contacts.is_greater_than_-]" "greater_than"] \ [list "[_ contacts.is_less_than_-]" "less_than"] \ ] - - lappend var_elements [list ${var1}:integer(text) [list label {}] [list html [list size 4 maxlength 20]]] + if { [exists_and_not_null operand] } { + lappend var_elements [list ${var1}:integer(text) [list label {}] [list html [list size 4 maxlength 20]]] + } } ams_value__time { set operand_options [list \ @@ -197,7 +201,7 @@ [list options $interval_options] \ [list after_html [list ago]] \ ] - } else { + } elseif { [exists_and_not_null operand] } { lappend var_elements [list ${var1}:date(date) [list label {}]] } }