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.21 -r1.22 --- openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 5 Apr 2006 22:15:15 -0000 1.21 +++ openacs-4/packages/contacts/tcl/contact-search-condition-type-procs.tcl 17 Apr 2006 06:15:01 -0000 1.22 @@ -21,6 +21,7 @@ {-revision_id "revision_id"} {-object_type "party"} {-prefix "condition"} + {-package_id ""} } { This proc defers its responses to all other contacts::search::condition_type::${type} procs. @@ -33,6 +34,9 @@ @param form_name The name of the template_form or ad_form being used } { + if { $package_id eq "" } { + set package_id [ad_conn package_id] + } if { [contacts::search::condition_type_exists_p -type $type] } { switch $request { @@ -47,23 +51,27 @@ type_name { } } - return [contacts::search::condition_type::${type} -request $request -form_name $form_name -var_list $var_list -party_id $party_id -revision_id $revision_id -object_type $object_type -prefix $prefix] + return [contacts::search::condition_type::${type} -request $request -form_name $form_name -var_list $var_list -party_id $party_id -revision_id $revision_id -object_type $object_type -prefix $prefix -package_id $package_id] } else { # the widget requested did not exist ns_log Debug "Contacts: the contacts search condition type \"${type}\" was requested and the associated ::contacts::search::condition_type::${type} procedure does not exist" } } ad_proc -private contacts::search::condition_types { + {-package_id ""} } { Return all widget procs. Each list element is a list of the first then pretty_name then the widget } { + if { $package_id eq "" } { + set package_id [ad_conn package_id] + } set condition_types [list] set all_procs [::info procs "::contacts::search::condition_type::*"] foreach condition_type $all_procs { if { [string is false [regsub {__arg_parser} $condition_type {} condition_type]] } { regsub {::contacts::search::condition_type::} $condition_type {} condition_type - lappend condition_types [list [contacts::search::condition_type -type $condition_type -request "type_name"] $condition_type] + lappend condition_types [list [contacts::search::condition_type -type $condition_type -request "type_name" -package_id $package_id] $condition_type] } } return [::ams::util::localize_and_sort_list_of_lists -list $condition_types] @@ -81,6 +89,7 @@ ad_proc -private contacts::search::condition_type::attribute { -request:required + -package_id:required {-var_list ""} {-form_name ""} {-party_id ""} @@ -526,6 +535,7 @@ ad_proc -private contacts::search::condition_type::contact { -request:required + -package_id:required {-var_list ""} {-form_name ""} {-party_id ""} @@ -714,6 +724,7 @@ ad_proc -private contacts::search::condition_type::group { -request:required + -package_id:required {-var_list ""} {-form_name ""} {-party_id ""} @@ -736,7 +747,7 @@ [list "[_ contacts.contact_is_not_in_-]" "not_in"] \ ] - set group_options_old [contact::groups -expand "all" -privilege_required "read"] + set group_options_old [contact::groups -expand "all" -privilege_required "read" -package_id $package_id] set group_options [list] foreach group $group_options_old { set group_name [lang::util::localize [lindex $group 0]] @@ -791,6 +802,7 @@ ad_proc -private contacts::search::condition_type::relationship { -request:required + -package_id:required {-var_list ""} {-form_name ""} {-party_id ""} Index: openacs-4/packages/contacts/tcl/contacts-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs.tcl,v diff -u -r1.78 -r1.79 --- openacs-4/packages/contacts/tcl/contacts-procs.tcl 10 Apr 2006 07:44:44 -0000 1.78 +++ openacs-4/packages/contacts/tcl/contacts-procs.tcl 17 Apr 2006 06:15:01 -0000 1.79 @@ -943,11 +943,15 @@ {-output "list"} {-all:boolean} {-no_member_count:boolean} + {-package_id ""} } { } { + if { $package_id ne "" } { + set package_id [ad_conn package_id] + } set user_id [ad_conn user_id] set group_list [list] - foreach one_group [contact::groups_list] { + foreach one_group [contact::groups_list -package_id $package_id] { util_unlist $one_group group_id group_name member_count component_count mapped_p default_p # We check if the group has the required privilege # specified on privilege_required switch, if not then Index: openacs-4/packages/contacts/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/search.tcl,v diff -u -r1.28 -r1.29 --- openacs-4/packages/contacts/www/search.tcl 5 Apr 2006 21:51:50 -0000 1.28 +++ openacs-4/packages/contacts/www/search.tcl 17 Apr 2006 06:15:01 -0000 1.29 @@ -278,7 +278,8 @@ -request ad_form_widgets \ -prefix "aggregate_" \ -without_arrow_p "t" \ - -only_multiple_p "t"] + -only_multiple_p "t" \ + -package_id [ad_conn package_id]] append form_elements { {aggregate:text(submit) {label "[_ contacts.Aggregate]"} {value "aggregate"}}