Changeset 4634
- Timestamp:
- 06/28/11 13:36:07 (13 years ago)
- 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 79 79 { 80 80 foreach($this->contacts as $item => $valor) 81 $contact .= ';'.$this->contacts[$item]['email']. ',';81 $contact .= str_replace("#",";",$this->contacts[$item]['email']) . ','; 82 82 //Retira ultima virgula. 83 83 $contact = substr($contact,0,(strlen($contact) - 1)); … … 118 118 if(!$this->contacts) // Used one time to insert the first contact in database 119 119 { 120 $this->db->insert_contact($val-> mailbox."@".$val->host);120 $this->db->insert_contact($val->personal."#".$val->mailbox."@".$val->host); 121 121 // Just new contact added. 122 $new_contacts[] = $val-> mailbox."@".$val->host;122 $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host; 123 123 $this->contacts = $this->db->get_dynamic_contacts(); 124 124 } … … 129 129 foreach($this->contacts as $item => $valor) 130 130 { 131 if($this->contacts[$item]['email'] == $val-> mailbox."@".$val->host) // check if email already exists131 if($this->contacts[$item]['email'] == $val->personal."#".$val->mailbox."@".$val->host) // check if email already exists 132 132 { 133 133 $this->contacts[$item]['timestamp'] = time(); //update timestamp of email … … 143 143 { 144 144 // Just new contact added. 145 $new_contacts[] = $val-> mailbox."@".$val->host;145 $new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host; 146 146 if($this->number_of_contacts > count($this->contacts)) 147 147 { 148 148 $this->contacts[] = array( 'timestamp' => time(), 149 'email' => $val-> mailbox."@".$val->host);149 'email' => $val->personal."#".$val->mailbox."@".$val->host); 150 150 } 151 151 if($this->number_of_contacts <= count($this->contacts)) 152 152 { 153 153 $this->contacts[$older_contact] = array( 'timestamp' => time(), 154 'email' => $val-> mailbox."@".$val->host);154 'email' => $val->personal."#".$val->mailbox."@".$val->host); 155 155 } 156 156 } -
branches/2.2/expressoMail1_2/js/main.js
r4596 r4634 1611 1611 for(var j in ar_contacts){ 1612 1612 // 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]; 1615 1615 } 1616 1616 }
Note: See TracChangeset
for help on using the changeset viewer.