Changeset 293 for trunk/contactcenter/inc/class.so_group.inc.php
- Timestamp:
- 06/03/08 17:58:40 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/inc/class.so_group.inc.php
r285 r293 116 116 'phpgw_cc_contact_conns B, phpgw_cc_connections C where '. 117 117 'A.id_contact = B.id_contact and B.id_connection = C.id_connection and '. 118 ' C.connection_is_default = true and B.id_typeof_contact_connection = 1 and'.119 ' A.id_owner ='.$this->owner.'order by A.names_ordered,C.connection_value';118 'A.id_owner ='.$this->owner.' and C.connection_is_default = true '. 119 ' order by A.names_ordered,C.connection_value'; 120 120 121 121 … … 131 131 $return[] = $this->db->row(); 132 132 } 133 134 return $return; 133 134 // Essa iteração transforma uma esturuta com contatos redundantes e separados por email ou tel. 135 // em outra com apenas 1 elemento pra cada contato 136 foreach($return as $i => $object){ 137 if ($object['id_typeof_contact_connection'] == 1){ 138 $all_contacts[$object['id_contact']]['connection_value'] = $object['connection_value']; 139 $all_contacts[$object['id_contact']]['names_ordered'] = $object['names_ordered']; 140 $all_contacts[$object['id_contact']]['id_contact'] = $object['id_contact']; 141 $all_contacts[$object['id_contact']]['id_connection'] = $object['id_connection']; 142 } 143 else 144 if ($object['id_typeof_contact_connection'] == 2){ 145 $all_contacts[$object['id_contact']]['phone'] = $object['connection_value']; 146 $all_contacts[$object['id_contact']]['names_ordered'] = $object['names_ordered']; 147 $all_contacts[$object['id_contact']]['id_contact'] = $object['id_contact']; 148 $all_contacts[$object['id_contact']]['id_connection'] = $object['id_connection']; 149 } 150 } 151 152 return array_values($all_contacts); 135 153 } 136 154
Note: See TracChangeset
for help on using the changeset viewer.