Changeset 5107


Ignore:
Timestamp:
09/30/11 14:25:00 (12 years ago)
Author:
rafaelraymundo
Message:

Ticket #2286 - Adicionado modulo acessivel ao Expresso.

Location:
branches/2.3
Files:
63 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/contactcenter/inc/class.bo_global_ldap_catalog.inc.php

    r4326 r5107  
    174174                                } 
    175175                        } 
    176                          
     176                 
     177                        if($refer_context || "ou" === strtolower(substr($this->src_info['context'], 0, 2))) 
     178                        { 
     179                                $followReferral = false; 
     180                        } 
     181                        elseif(trim($rules[4]['value']) != "inetOrgPerson") 
     182                        { 
     183                                $followReferral = true; 
     184                        } else{                          
     185                                return false; 
     186                        } 
     187 
     188                        $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral); 
     189                        $result_r = ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']); 
     190         
    177191                        $result_u = ldap_get_entries($ldap, $result_r); 
    178192                        //      No entries found. 
  • branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php

    r5106 r5107  
    33843384        } 
    33853385 
     3386        function ac_search($params) 
     3387        { 
     3388                include("class.imap_attachment.inc.php"); 
     3389                $imap_attachment = new imap_attachment(); 
     3390                $criterias = array ("TO","SUBJECT","FROM","CC"); 
     3391                $return = array(); 
     3392                $folders = $this->get_folders_list(); 
     3393                $num_msgs = 0; 
     3394 
     3395                foreach($folders as $id =>$folder) 
     3396                { 
     3397                        if(strpos($folder['folder_id'],'user')===false && is_array($folder)) { 
     3398                                foreach($criterias as $criteria_fixed) 
     3399                    { 
     3400                        $_filter = $criteria_fixed . ' "'.$params['filter'].'"'; 
     3401                                        $mbox_stream = $this->open_mbox($folder['folder_name']); 
     3402 
     3403                                        $messages = imap_search($mbox_stream, $_filter, SE_UID); 
     3404 
     3405                                        if ($messages == ''){ 
     3406                                                if($mbox_stream) 
     3407                                                        imap_close($mbox_stream); 
     3408                                                continue; 
     3409                                        } 
     3410 
     3411                                        foreach($messages as $msg_number) 
     3412                                        { 
     3413                                                $temp = $this->get_info_head_msg($msg_number); 
     3414                                                if(!$temp) 
     3415                                                        return false; 
     3416 
     3417                                                $return[$num_msgs] = $temp; 
     3418                                                $num_msgs++; 
     3419                                        } 
     3420                                        $return['num_msgs'] = $num_msgs; 
     3421 
     3422                                        if($mbox_stream) 
     3423                                                imap_close($mbox_stream); 
     3424                                } 
     3425                        } 
     3426 
     3427                } 
     3428                return $return; 
     3429        } 
    33863430 
    33873431        function mobile_search($params) 
Note: See TracChangeset for help on using the changeset viewer.