Index: openacs-4/packages/acs-tcl/tcl/admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/admin-procs.tcl,v diff -u -r1.21.8.1 -r1.21.8.2 --- openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 27 Aug 2013 11:01:48 -0000 1.21.8.1 +++ openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 2 Oct 2013 06:23:40 -0000 1.21.8.2 @@ -227,22 +227,22 @@ if { [info exists $criteria] && [set $criteria] ne "" } { switch $criteria { "category_id" { - if {[lsearch $tables "users_interests"] == -1 } { + if {"users_interests" ni $tables} { lappend tables "users_interests" lappend join_clauses "users.user_id = users_interests.user_id" } lappend where_clauses "users_interests.category_id = [ns_dbquotevalue $category_id]" } "Country_code" { - if {[lsearch $tables "users_contact"] == -1 } { + if {"users_contact" ni $tables} { lappend tables "users_contact" lappend join_clauses "users.user_id = users_contact.user_id" } lappend where_clauses "users_contact.ha_country_code = [ns_dbquotevalue $country_code]" } "usps_abbrev" { - if {[lsearch $tables "users_contact"] == -1 } { + if {"users_contact" ni $tables} { lappend tables "users_contact" lappend join_clauses "users.user_id = users_contact.user_id" } @@ -276,7 +276,7 @@ if { [info exists count_only_p] && $count_only_p } { lappend where_clauses "[parameter::get -parameter ExpensiveThreshold] < (select sum(amount) from users_charges where users_charges.user_id = users.user_id)" } else { - if {[lsearch $tables "user_charges"] == -1 } { + if {"user_charges" ni $tables} { lappend tables "users_charges" lappend join_clauses "users.user_id = users_charges.user_id" } @@ -293,7 +293,7 @@ } "sex" { - if {[lsearch $tables "users_demographics"] == -1 } { + if {"users_demographics" ni $tables} { lappend tables "users_demographics" lappend join_clauses "users.user_id = users_demographics.user_id" } @@ -302,15 +302,15 @@ } "age_below_years" { - if {[lsearch $tables "users_demographics"] == -1 } { + if {"users_demographics" ni $tables} { lappend tables "users_demographics" lappend join_clauses "users.user_id = users_demographics.user_id" } lappend where_clauses "users_demographics.birthdate > sysdate - ([ns_dbquotevalue $age_below_years] * 365.25)" } "age_above_years" { - if {[lsearch $tables "users_demographics"] == -1 } { + if {"users_demographics" ni $tables} { lappend tables "users_demographics" lappend join_clauses "users.user_id = users_demographics.user_id" }