jeffd
committed
on 22 Mar 04
doh. should have ben packages not contrib/packages
/tcl/contacts-callback-procs.tcl (+3 -2)
87 87     }
88 88 }
89 89
90 90 ad_proc -public -callback fs::folder_chunk::add_bulk_actions -impl contacts {
91 91     {-bulk_variable:required}
92 92     {-folder_id:required}
93 93     {-var_export_list:required}
94 94 } {
95 95     Callback to add a bulk action for sending a mail to the contact with the files attached that are mapped in the folder view
96 96     If you have an organization, all persons related to it will be added to the mail sending as well.
97 97
98 98     @author Malte Sussdorff (sussdorff@sussdorff.de)
99 99     @creation-date 2005-06-15
100 100    
101 101     @param bulk_variable The name of the variable to upvar for extending the bulk variable list
102 102
103 103     @return
104 104    
105 105     @error
106 106 } {
  107     set community_id [dotlrn_community::get_community_id]
107 108    
108       set contact_organizations [application_data_link::get_linked -from_object_id $folder_id -to_object_type "organization"]
  109     set contact_organizations [application_data_link::get_linked -from_object_id $community_id -to_object_type "organization"]
109 110    
110 111     set contact_list ""
111 112     foreach party_id $contact_organizations {
112 113         set contact_list [concat $contact_list [contact::util::get_employees -organization_id $party_id]]
113 114     }
114 115         
115 116     if {[exists_and_not_null contact_list]} {
116 117         upvar $bulk_variable local_var
117 118         upvar $var_export_list local_list
118 119         upvar party_ids contact_ids_loc
119 120         set contact_ids_loc $contact_list
120 121         upvar return_url return_loc
121 122         set return_loc "/contacts/$party_id"
122 123         lappend local_var "Mail to contact" "/contacts/message" "Mail to contact"
123 124         lappend local_list "party_ids"
124 125     }
125 126 }
126 127