Changeset 4634 for branches


Ignore:
Timestamp:
06/28/11 13:36:07 (13 years ago)
Author:
roberto.santosjunior
Message:

Ticket #2031 - Contato Dinâmico não guarda o nome do contato

Location:
branches/2.2/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.dynamic_contacts.inc.php

    r1059 r4634  
    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)); 
     
    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                                        } 
  • branches/2.2/expressoMail1_2/js/main.js

    r4596 r4634  
    16111611                        for(var j in ar_contacts){ 
    16121612                                // If the dynamic contact don't exist, update the autocomplete.... 
    1613                                 if((contacts+",").indexOf(";"+ar_contacts[j]+",") == -1) 
    1614                                         contacts += ",;" + ar_contacts[j]; 
     1613                                if((contacts+",").indexOf(ar_contacts[j]+",") == -1) 
     1614                                        contacts += "," + ar_contacts[j]; 
    16151615                        } 
    16161616                } 
Note: See TracChangeset for help on using the changeset viewer.