Changeset 502
- Timestamp:
- 10/01/08 16:45:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.db_functions.inc.php
r484 r502 4 4 include_once(PHPGW_API_INC.'/class.db.inc.php'); 5 5 include_once('class.dynamic_contacts.inc.php'); 6 6 7 7 class db_functions 8 8 { … … 31 31 $stringDropDownContacts = ''; 32 32 // Pesquisa no CC os nomes e email dos contatos. 33 $query = 'select A.names_ordered, C.connection_value from phpgw_cc_contact A,'. 34 'phpgw_cc_contact_conns B, phpgw_cc_connections C where '. 35 'A.id_contact = B.id_contact and B.id_connection = C.id_connection '. 36 'and B.id_typeof_contact_connection = 1 and '. 37 'A.id_owner ='.$this -> user_id.' order by A.names_ordered'; 38 33 $query = 'select A.names_ordered, C.connection_value from phpgw_cc_contact A, 34 phpgw_cc_contact_conns B, phpgw_cc_connections C where 35 A.id_contact = B.id_contact and B.id_connection = C.id_connection 36 and B.id_typeof_contact_connection = 1 and 37 (A.id_owner ='.$this -> user_id.' or 38 A.id_owner in ( 39 select id_related from phpgw_cc_contact_rels where id_contact='.$this -> user_id.' and id_typeof_contact_relation=1 40 ) 41 ) 42 group by A.names_ordered,C.connection_value 43 order by A.names_ordered'; 39 44 if (!$this->db->query($query)) 40 45 return null; … … 143 148 } 144 149 145 function get_dropdown_contacts() 150 function get_dropdown_contacts(){ 146 151 147 152 $contacts = $this -> get_cc_contacts(); … … 156 161 elseif ((!$contacts) && ($groups)) 157 162 $stringDropDownContacts = $groups; 158 163 159 164 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] && 160 165 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) { … … 274 279 { 275 280 return $this->db->Error; 276 281 } 277 282 while($this->db->next_record()) 278 283 { … … 292 297 return $contacts; 293 298 } 294 295 299 function update_contacts($contacts=array()) 296 300 {
Note: See TracChangeset
for help on using the changeset viewer.