- Timestamp:
- 05/20/09 16:08:06 (15 years ago)
- Location:
- trunk/contactcenter
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/inc/class.bo_global_ldap_catalog.inc.php
r400 r880 132 132 133 133 $filter = $this->process_restrictions($rules, $trans_f); 134 134 // Find objects where 'mail' attribute is not null. 135 $filter = "(&".$filter."(mail=*))"; 135 136 if("ou" === strtolower(substr($this->src_info['context'], 0, 2)) || 136 (trim($rules[ 4]['value']) != "inetOrgPerson"))137 (trim($rules[0]['value']) == "phpgwAccount")) 137 138 { 138 139 $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], true); -
trunk/contactcenter/inc/class.bo_ldap_manager.inc.php
r588 r880 45 45 'acc' => $data['cc_ldap_browse_dn0'], 46 46 'pw' => $data['cc_ldap_pw0'], 47 'obj' => ' inetOrgPerson',47 'obj' => 'phpgwAccount', 48 48 'branch' => strtolower('ou'), 49 49 'visible' => $data['cc_ldap_query_automatic'] -
trunk/contactcenter/inc/class.ui_data.inc.php
r752 r880 296 296 case 'get_catalog_participants_list': 297 297 echo serialize($this->get_catalog_participants_list($_POST['id'])); 298 return; 299 300 case 'get_catalog_participants_group': 301 echo serialize($this->get_catalog_participants_group($_POST['id'])); 298 302 return; 299 303 … … 701 705 * Restrict the returned contacts in a "first letter" search 702 706 * to objectClass = phpgwAccount, must have attibute phpgwAccountStatus, 703 * phpgwAccountVisible != -1 and objectClass = inetOrgPerson707 * phpgwAccountVisible != -1 704 708 */ 705 709 1 => array( … … 717 721 'type' => '!=', 718 722 'value' => '-1' 719 ), 720 4 => array( 721 'field' => 'contact.object_class', 722 'type' => '=', 723 'value' => 'inetOrgPerson' 724 ), 723 ) 725 724 ); 726 725 // If not external catalog get only phpgwAccountType = u ou l … … 745 744 'type' => '=', 746 745 'value' => 'l' 746 ), 747 3 => array( 748 'field' => 'contact.account_type', 749 'type' => '=', 750 'value' => 'g' 747 751 ) 748 752 ) … … 756 760 * Restrict the returned contacts in a "first number" search 757 761 * to objectClass = phpgwAccount, must have attibute phpgwAccountStatus, 758 * phpgwAccountVisible != -1 and objectClass = inetOrgPerson762 * phpgwAccountVisible != -1 759 763 */ 760 764 0 => array( … … 774 778 ), 775 779 3 => array( 776 'field' => 'contact.object_class',777 'type' => '=',778 'value' => 'inetOrgPerson'779 ),780 4 => array(781 780 'type' => 'branch', 782 781 'value' => 'OR', … … 852 851 'value' => 'i' 853 852 ), 854 /*1 => array(855 'field' => 'contact.account_type',856 'type' => '=',857 'value' => 'g'858 ),*/859 853 2 => array( 860 854 'field' => 'contact.account_type', 861 855 'type' => '=', 862 856 'value' => 'l' 857 ), 858 3 => array( 859 'field' => 'contact.account_type', 860 'type' => '=', 861 'value' => 'g' 863 862 ) 863 864 864 ) 865 865 ); … … 1257 1257 $final[3][$i][6] = $ids[$i]; 1258 1258 1259 // If contact is a public list , then load the forwarding addresses.1260 if($contact['account_type'][0] == 'l' )1261 $final[3][$i][7] = array();1259 // If contact is a public list or a group, then load the forwarding addresses. 1260 if($contact['account_type'][0] == 'l' || $contact['account_type'][0] == 'g') 1261 $final[3][$i][7] = ($contact['account_type'][0] == 'l' ? 'list' : 'group'); 1262 1262 1263 1263 if($this->page_info['actual_catalog']['class']=='bo_shared_people_manager') { … … 2317 2317 /* 2318 2318 * Restrict the returned contacts search to objectClass = phpgwAccount, 2319 * must have attibute phpgwAccountStatus, phpgwAccountVisible != -1 and 2320 * objectClass = inetOrgPerson 2319 * must have attibute phpgwAccountStatus, phpgwAccountVisible != -1 2321 2320 */ 2322 2321 $rules = array( … … 2336 2335 'value' => '-1' 2337 2336 ), 2338 3 => array(2339 'field' => 'contact.object_class',2340 'type' => '=',2341 'value' => 'inetOrgPerson'2342 )2343 2337 ); 2344 2338 } … … 2762 2756 } 2763 2757 2758 function get_catalog_participants_group($id) 2759 { 2760 if(!$this->bo->catalog->src_info) { 2761 $ldap = CreateObject('contactcenter.bo_ldap_manager'); 2762 $this->bo->catalog->src_info = $ldap->srcs[1]; 2763 } 2764 $ds = $GLOBALS['phpgw']->common->ldapConnect($this->bo->catalog->src_info['host'], $this->bo->catalog->src_info['acc'], $this->bo->catalog->src_info['pw'], true); 2765 $justThese = array("description","memberuid"); 2766 $sr = ldap_read($ds,$id, "objectClass=*",$justThese); 2767 $info = ldap_get_entries($ds, $sr); 2768 $member_uids = $info[0]['memberuid']; 2769 $contact['names_ordered'] = $info[0]['description']; 2770 $filter = ""; 2771 for($z = 0; $z < count($member_uids); $z++) { 2772 if($member_uids[$z]) 2773 $filter.="(uid=".$member_uids[$z].")"; 2774 } 2775 $array_participants = array(); 2776 if($filter) { 2777 $filter = "(|".$filter.")"; 2778 $dn=$this->bo->catalog->src_info['dn']; 2779 $justThese = array("cn","mail"); 2780 $sr = ldap_search($ds,$dn, $filter,$justThese); 2781 $info = ldap_get_entries($ds, $sr); 2782 for($z = 0; $z < $info['count']; $z++) { 2783 $participant = '<font color=\'DARKBLUE\'> "'.$info[$z]['cn'][0].'" <'.$info[$z]['mail'][0].'></font><br>'; 2784 $array_emails[$info[$z]['mail'][0]] = null; 2785 array_push($array_participants, $participant); 2786 } 2787 ldap_close($ds); 2788 } 2789 sort($array_participants); 2790 $innerHTML = ''; 2791 foreach($array_participants as $index => $participant){ 2792 $innerHTML .= $participant; 2793 } 2794 $return = array('size' => count($array_participants), 'names_ordered'=> $contact['names_ordered'], 'inner_html' => $innerHTML); 2795 echo serialize($return); 2796 } 2797 2764 2798 function get_catalog_participants_list($id) 2765 2799 { … … 2772 2806 $array_participants = array(); 2773 2807 $array_emails = array(); 2774 2808 2775 2809 $filter = null; 2776 2810 for($z = 0; $z < $contact['mail_forwarding_address']['count']; $z++) { … … 2789 2823 $this->bo->catalog->src_info = $ldap->srcs[1]; 2790 2824 } 2791 $ds = $GLOBALS['phpgw']->common->ldapConnect($this->bo->catalog->src_info['host'], $this->bo->catalog->src_info['acc'], $this->bo->catalog->src_info['pw'], true); 2825 $ds = $GLOBALS['phpgw']->common->ldapConnect($this->bo->catalog->src_info['host'], $this->bo->catalog->src_info['acc'], $this->bo->catalog->src_info['pw'], true); 2826 2792 2827 $dn=$this->bo->catalog->src_info['dn']; 2793 2828 $justThese = array("cn","mail"); -
trunk/contactcenter/js/cc.js
r752 r880 1958 1958 1959 1959 case 'cc_forwarding_address': 1960 var contacts= data[3][pos][k];1961 1962 if( ! contacts)1960 var account_type = data[3][pos][k]; 1961 1962 if( !account_type) 1963 1963 break; 1964 1965 Element(id+':cc_icon_group').innerHTML = '<span title="'+Element('cc_participants').value+'" onmouseout="window.status=\'\';" onclick="ccListParticipants.showList(\''+ Element(id+':cc_id').value + '\' );return true;" style="cursor: pointer; cursor: hand; z-index: 1"><img src="templates/default/images/people-mini.png" align="center"> </span>';1964 1965 Element(id+':cc_icon_group').innerHTML = '<span title="'+Element('cc_participants').value+'" onmouseout="window.status=\'\';" onclick="ccListParticipants.showList(\''+ Element(id+':cc_id').value + '\',null,null,null,\''+account_type+'\');return true;" style="cursor: pointer; cursor: hand; z-index: 1"><img src="templates/default/images/people-mini.png" align="center"> </span>'; 1966 1966 break; 1967 1967 -
trunk/contactcenter/js/ccListParticipants.js
r24 r880 19 19 20 20 21 cListParticipants.prototype.showList = function(id, contact, email, title ){21 cListParticipants.prototype.showList = function(id, contact, email, title, account_type){ 22 22 _this = this; 23 23 24 24 id = id; 25 25 26 26 div = document.getElementById(id+':cc_rectParticipants'); 27 27 var el = document.createElement("DIV"); … … 93 93 _this.showWindow(el); 94 94 } 95 95 96 96 if(div) 97 97 this.showWindow(div); 98 98 else 99 Connector.newRequest('get_catalog_participants_ list', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_catalog_participants_list', 'POST', handler, 'id='+id);99 Connector.newRequest('get_catalog_participants_'+account_type , '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_catalog_participants_'+account_type, 'POST', handler, 'id='+id); 100 100 } 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.