Changeset 4328 for branches/2.2.0.1


Ignore:
Timestamp:
05/11/11 10:05:39 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1726 - Resolvendo problema de edição de grupo compartilhado. r4315

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/contactcenter/inc/class.so_group.inc.php

    r4121 r4328  
    167167 
    168168                                $query .= ' from' 
    169                                                 . ' phpgw_cc_contact' 
    170                                                 . ' inner join phpgw_cc_contact_conns on ( phpgw_cc_contact.id_contact = phpgw_cc_contact_conns.id_contact )' 
    171                                                 . ' inner join phpgw_cc_connections on ( phpgw_cc_contact_conns.id_connection = phpgw_cc_connections.id_connection )' 
    172                                                 . ' left join phpgw_cc_contact_addrs on ( phpgw_cc_contact.id_contact = phpgw_cc_contact_addrs.id_contact )' 
     169                                                . ' phpgw_cc_contact A' 
     170                                                . ' inner join phpgw_cc_contact_conns B on ( A.id_contact = B.id_contact )' 
     171                                                . ' inner join phpgw_cc_connections C on ( B.id_connection = C.id_connection )' 
     172                                                . ' left join phpgw_cc_contact_addrs on ( A.id_contact = phpgw_cc_contact_addrs.id_contact )' 
    173173                                                . ' left join phpgw_cc_addresses on ( phpgw_cc_contact_addrs.id_address = phpgw_cc_addresses.id_address )' 
    174174                                                . ' left join phpgw_cc_city on ( phpgw_cc_addresses.id_city = phpgw_cc_city.id_city )' 
     
    177177 
    178178                                $query .= ' where' 
    179                                                 . " phpgw_cc_contact.id_owner = {$this->owner}" 
     179                                                . " A.id_owner = {$this->owner}" 
    180180                                                //. ' and phpgw_cc_connections.connection_is_default = true' 
    181181                                                ; 
     
    196196 
    197197                        if ( $field == 'only_email' ) 
    198                                 $query .= 'and phpgw_cc_contact_conns.id_typeof_contact_connection = 1 '; 
    199  
    200                         $query .= ' order by phpgw_cc_contact.names_ordered, phpgw_cc_connections.connection_value'; 
     198                                $query .= ' and B.id_typeof_contact_connection = 1 '; 
     199 
     200                        $query .= ' order by A.names_ordered, C.connection_value'; 
    201201 
    202202                        if (!$this->db->query($query)) 
Note: See TracChangeset for help on using the changeset viewer.