Ignore:
Timestamp:
11/03/11 13:24:28 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus, do modulo ExpressoMail?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.dynamic_contacts.inc.php

    r1059 r5134  
    7979                        { 
    8080                                foreach($this->contacts as $item => $valor) 
    81                                         $contact .= ';'.$this->contacts[$item]['email'] . ','; 
     81                                        $contact .= str_replace("#",";",$this->contacts[$item]['email']) . ','; 
    8282                                //Retira ultima virgula. 
    8383                                $contact = substr($contact,0,(strlen($contact) - 1)); 
     
    106106                { 
    107107                        // Trim all whitespaces and duplicated commas from full_email_address 
    108                         $full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address)); 
     108                        $full_email_address = preg_replace('{(,)\1+}',',',$full_email_address); 
    109109                        $parse_address = imap_rfc822_parse_adrlist($full_email_address, ""); 
    110110                        $new_contacts = array(); 
     
    118118                                if(!$this->contacts) // Used one time to insert the first contact in database 
    119119                                { 
    120                                         $this->db->insert_contact($val->mailbox."@".$val->host); 
     120                                        $this->db->insert_contact($val->personal."#".$val->mailbox."@".$val->host); 
    121121                                        // Just new contact added. 
    122                                         $new_contacts[] = $val->mailbox."@".$val->host; 
     122                                        $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host;  
    123123                                        $this->contacts = $this->db->get_dynamic_contacts(); 
    124124                                } 
     
    129129                                        foreach($this->contacts as $item => $valor) 
    130130                                        { 
    131                                                 if($this->contacts[$item]['email'] == $val->mailbox."@".$val->host) // check if email already exists 
     131                                                if($this->contacts[$item]['email'] == $val->personal."#".$val->mailbox."@".$val->host) // check if email already exists 
    132132                                                {        
    133133                                                        $this->contacts[$item]['timestamp'] = time(); //update timestamp of email 
     
    143143                                        { 
    144144                                                // Just new contact added. 
    145                                                 $new_contacts[] = $val->mailbox."@".$val->host; 
     145                                                $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host; 
    146146                                                if($this->number_of_contacts > count($this->contacts)) 
    147147                                                { 
    148148                                                        $this->contacts[] = array( 'timestamp'  => time(), 
    149                                                                                                                 'email'         => $val->mailbox."@".$val->host); 
     149                                                                                                                'email'         => $val->personal."#".$val->mailbox."@".$val->host); 
    150150                                                } 
    151151                                                if($this->number_of_contacts <= count($this->contacts)) 
    152152                                                { 
    153153                                                        $this->contacts[$older_contact] = array( 'timestamp'    => time(), 
    154                                                                                                                                                 'email'         => $val->mailbox."@".$val->host); 
     154                                                                                                                                                'email'         => $val->personal."#".$val->mailbox."@".$val->host); 
    155155                                                } 
    156156                                        } 
Note: See TracChangeset for help on using the changeset viewer.