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.36 -r1.37 --- openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 26 Jun 2006 06:36:51 -0000 1.36 +++ openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 26 Jun 2006 08:26:53 -0000 1.37 @@ -915,7 +915,7 @@ } } -ad_proc -private contacts::search::condition_type::group { +ad_proc -private contacts::search::condition_type::lists { -request:required -package_id:required {-var_list ""} @@ -925,6 +925,10 @@ {-prefix "contact"} {-object_type ""} } { + This procedure cannot be name condition_type::list because it breaks the ::list command in + other search condition types. + + Return all widget procs. Each list element is a list of the first then pretty_name then the widget @param party_id the sql column where a party id can be found (normally something like parties.party_id, but it might be persons.person_id, or organizations.organization_id) Index: openacs-4/packages/contacts/tcl/contact-search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contact-search-procs.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/contacts/tcl/contact-search-procs.tcl 26 Jun 2006 06:36:51 -0000 1.33 +++ openacs-4/packages/contacts/tcl/contact-search-procs.tcl 26 Jun 2006 08:26:53 -0000 1.34 @@ -552,7 +552,7 @@ } { contact::search::permitted -search_id $search_id if { $and_p } { - set resutls [util_memoize [list ::contact::search::where_clause_not_cached \ + set results [util_memoize [list ::contact::search::where_clause_not_cached \ -search_id $search_id \ -and \ -party_id $party_id \ @@ -566,13 +566,12 @@ -limit_type_p $limit_type_p]] } - if { $results eq "" } { + if { $results eq {} } { # we allow for the special case that somebody supplied a # list_id instead of a search_id, if this was the case and # they have permission to read this list if { [contact::list::exists_p -list_id $search_id] } { if { [contact::owner_read_p -object_id $search_id -owner_id [ad_conn user_id]] } { - set result {} if { $and_p } { append results " and " } @@ -581,7 +580,6 @@ } } return $results - } ad_proc -public contact::search::where_clause_not_cached { @@ -637,14 +635,14 @@ append result [lindex $where_clauses 0] } } - } - if { [exists_and_not_null result] } { - set result "( $result )" - if { $and_p } { + if { [exists_and_not_null result] } { + set result "( $result )" + if { $and_p } { set result "and $result" + } } } else { - set result {} + set result {} } return $result