Changeset 1280 for trunk/contactcenter/inc/class.so_group.inc.php
- Timestamp:
- 08/05/09 18:20:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/inc/class.so_group.inc.php
r752 r1280 107 107 } 108 108 109 110 function selectAllContacts( $field = false ) 111 { 112 113 $query = 'select C.id_connection, A.id_contact, A.names_ordered, C.connection_value , B.id_typeof_contact_connection from phpgw_cc_contact A,'. 114 'phpgw_cc_contact_conns B, phpgw_cc_connections C where '. 115 'A.id_contact = B.id_contact and B.id_connection = C.id_connection and '. 116 'A.id_owner ='.$this->owner.' and C.connection_is_default = true '; 109 //Owner = null means the owner setted on constructor. 110 function selectAllContacts( $field = false ,$shared_from=null) 111 { 112 if($shared_from==null) { 113 $query = 'select C.id_connection, A.id_contact, A.names_ordered, C.connection_value , B.id_typeof_contact_connection from phpgw_cc_contact A,'. 114 'phpgw_cc_contact_conns B, phpgw_cc_connections C where '. 115 'A.id_contact = B.id_contact and B.id_connection = C.id_connection and '. 116 'A.id_owner ='.$this->owner.' and C.connection_is_default = true '; 117 } 118 else { 119 $sub_query = 'select A.id_related from phpgw_cc_contact_rels A,phpgw_acl B 120 where B.acl_location!=\'run\' and A.id_contact = B.acl_location::bigint and A.id_related = B.acl_account and 121 B.acl_appname = \'contactcenter\' and B.acl_rights & 1 <> 0 122 and A.id_typeof_contact_relation=1 and A.id_contact = '.$shared_from.' and A.id_related='.$this->owner; 123 124 $query = 'select C.id_connection, A.id_contact, A.names_ordered, C.connection_value , B.id_typeof_contact_connection from phpgw_cc_contact A,'. 125 'phpgw_cc_contact_conns B, phpgw_cc_connections C where '. 126 'A.id_contact = B.id_contact and B.id_connection = C.id_connection and '. 127 'A.id_owner in ('.$shared_from.',('.$sub_query.'))'. 128 ' and C.connection_is_default = true '; 129 } 117 130 118 131 if ( $field == 'only_email' ) … … 256 269 'A.id_contact = B.id_contact and B.id_connection = C.id_connection '. 257 270 'and B.id_typeof_contact_connection = 1 and '. 258 'A.id_owner ='.$this->owner.' and D.id_connection = C.id_connection and D.id_group = '.$id_group. 271 //'A.id_owner ='.$this->owner.' and D.id_connection = C.id_connection and D.id_group = '.$id_group. 272 ' D.id_connection = C.id_connection and D.id_group = '.$id_group. //If I have the group ID, why ask about owner? 259 273 ' order by A.names_ordered'; 260 274
Note: See TracChangeset
for help on using the changeset viewer.