Changeset 4484 in subversion
- Timestamp:
- Feb 3, 2011 8:58:07 AM (2 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 17 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/main.inc (modified) (1 diff)
-
program/include/rcmail.php (modified) (1 diff)
-
program/include/rcube_config.php (modified) (1 diff)
-
program/include/rcube_ldap.php (modified) (1 diff)
-
program/include/rcube_shared.inc (modified) (1 diff)
-
program/include/rcube_smtp.php (modified) (2 diffs)
-
program/include/rcube_template.php (modified) (1 diff)
-
program/steps/addressbook/import.inc (modified) (1 diff)
-
program/steps/addressbook/save.inc (modified) (1 diff)
-
program/steps/mail/addcontact.inc (modified) (1 diff)
-
program/steps/mail/compose.inc (modified) (4 diffs)
-
program/steps/mail/func.inc (modified) (1 diff)
-
program/steps/mail/sendmail.inc (modified) (2 diffs)
-
program/steps/settings/edit_identity.inc (modified) (1 diff)
-
program/steps/settings/func.inc (modified) (1 diff)
-
program/steps/settings/save_identity.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r4483 r4484 2 2 =========================== 3 3 4 - Fix IDNA support when IDN/INTL modules are in use (#1487742) 4 5 - Fix handling of invalid HTML comments in messages (#1487759) 5 6 - Fix parsing FETCH response for very long headers (#1487753) -
trunk/roundcubemail/program/include/main.inc
r4461 r4484 1892 1892 } 1893 1893 1894 /* 1895 * Idn_to_ascii wrapper. 1896 * Intl/Idn modules version of this function doesn't work with e-mail address 1897 */ 1898 function rcube_idn_to_ascii($str) 1899 { 1900 return rcube_idn_convert($str, true); 1901 } 1902 1903 /* 1904 * Idn_to_ascii wrapper. 1905 * Intl/Idn modules version of this function doesn't work with e-mail address 1906 */ 1907 function rcube_idn_to_utf8($str) 1908 { 1909 return rcube_idn_convert($str, false); 1910 } 1911 1912 function rcube_idn_convert($input, $is_utf=false) 1913 { 1914 if ($at = strpos($input, '@')) { 1915 $user = substr($input, 0, $at); 1916 $domain = substr($input, $at+1); 1917 } 1918 else { 1919 $domain = $input; 1920 } 1921 1922 $domain = $is_utf ? idn_to_ascii($domain) : idn_to_utf8($domain); 1923 1924 return $at ? $user . '@' . $domain : $domain; 1925 } 1926 1894 1927 1895 1928 /** -
trunk/roundcubemail/program/include/rcmail.php
r4480 r4484 700 700 // Here we need IDNA ASCII 701 701 // Only rcube_contacts class is using domain names in Unicode 702 $host = idn_to_ascii($host);702 $host = rcube_idn_to_ascii($host); 703 703 if (strpos($username, '@')) { 704 704 // lowercase domain name 705 705 list($local, $domain) = explode('@', $username); 706 706 $username = $local . '@' . mb_strtolower($domain); 707 $username = idn_to_ascii($username);707 $username = rcube_idn_to_ascii($username); 708 708 } 709 709 -
trunk/roundcubemail/program/include/rcube_config.php
r4410 r4484 288 288 289 289 if ($encode) 290 $domain = idn_to_ascii($domain);290 $domain = rcube_idn_to_ascii($domain); 291 291 292 292 return $domain; -
trunk/roundcubemail/program/include/rcube_ldap.php
r4467 r4484 139 139 foreach ($this->prop['hosts'] as $host) 140 140 { 141 $host = idn_to_ascii(rcube_parse_host($host));141 $host = rcube_idn_to_ascii(rcube_parse_host($host)); 142 142 $this->_debug("C: Connect [$host".($this->prop['port'] ? ':'.$this->prop['port'] : '')."]"); 143 143 -
trunk/roundcubemail/program/include/rcube_shared.inc
r4424 r4484 720 720 } 721 721 722 if ($idn && $domain && preg_match('/(^| @|\.)xn--/i', $domain)) {722 if ($idn && $domain && preg_match('/(^|\.)xn--/i', $domain)) { 723 723 try { 724 724 $domain = $idn->decode($domain); -
trunk/roundcubemail/program/include/rcube_smtp.php
r4410 r4484 102 102 103 103 // IDNA Support 104 $smtp_host = idn_to_ascii($smtp_host);104 $smtp_host = rcube_idn_to_ascii($smtp_host); 105 105 106 106 $this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host); … … 133 133 { 134 134 // IDNA Support 135 if (strpos($smtp_user, '@')) 136 $smtp_user = idn_to_ascii($smtp_user); 135 if (strpos($smtp_user, '@')) { 136 $smtp_user = rcube_idn_to_ascii($smtp_user); 137 } 137 138 138 139 $result = $this->conn->auth($smtp_user, $smtp_pass, $smtp_auth_type, $use_tls, $smtp_authz); -
trunk/roundcubemail/program/include/rcube_template.php
r4424 r4484 1035 1035 } 1036 1036 1037 return idn_to_utf8($username);1037 return rcube_idn_to_utf8($username); 1038 1038 } 1039 1039 -
trunk/roundcubemail/program/steps/addressbook/import.inc
r4424 r4484 137 137 138 138 // We're using UTF8 internally 139 $email = idn_to_utf8($email);139 $email = rcube_idn_to_utf8($email); 140 140 141 141 if (!$replace) { -
trunk/roundcubemail/program/steps/addressbook/save.inc
r4467 r4484 143 143 foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) { 144 144 if (strlen($email)) { 145 $_email = idn_to_ascii($email);145 $_email = rcube_idn_to_ascii($email); 146 146 if (!check_email($_email, false)) { 147 147 $OUTPUT->show_message('emailformaterror', 'warning', array('email' => $email)); -
trunk/roundcubemail/program/steps/mail/addcontact.inc
r4410 r4484 47 47 } 48 48 49 $contact['email'] = idn_to_utf8($contact['email']);49 $contact['email'] = rcube_idn_to_utf8($contact['email']); 50 50 51 51 // use email address part for name -
trunk/roundcubemail/program/steps/mail/compose.inc
r4481 r4484 322 322 continue; 323 323 324 $mailto = idn_to_utf8($addr_part['mailto']);324 $mailto = rcube_idn_to_utf8($addr_part['mailto']); 325 325 326 326 if (!in_array($mailto, $sa_recipients) … … 361 361 continue; 362 362 363 $mailto = idn_to_utf8($addr_part['mailto']);363 $mailto = rcube_idn_to_utf8($addr_part['mailto']); 364 364 365 365 if ($addr_part['name'] && $addr_part['mailto'] != $addr_part['name']) … … 438 438 foreach ($user_identities as $sql_arr) 439 439 { 440 $email = mb_strtolower( idn_to_utf8($sql_arr['email']));440 $email = mb_strtolower(rcube_idn_to_utf8($sql_arr['email'])); 441 441 $identity_id = $sql_arr['identity_id']; 442 442 $select_from->add(format_email_recipient($email, $sql_arr['name']), $identity_id); … … 735 735 $from = array_pop($RCMAIL->imap->decode_address_list($MESSAGE->get_header('from'), 1, false)); 736 736 $prefix = sprintf("On %s, %s wrote:", 737 $MESSAGE->headers->date, $from['name'] ? $from['name'] : idn_to_utf8($from['mailto']));737 $MESSAGE->headers->date, $from['name'] ? $from['name'] : rcube_idn_to_utf8($from['mailto'])); 738 738 739 739 if (!$bodyIsHtml) { -
trunk/roundcubemail/program/steps/mail/func.inc
r4475 r4484 1251 1251 // IDNA ASCII to Unicode 1252 1252 if ($name == $mailto) 1253 $name = idn_to_utf8($name);1253 $name = rcube_idn_to_utf8($name); 1254 1254 if ($string == $mailto) 1255 $string = idn_to_utf8($string);1256 $mailto = idn_to_utf8($mailto);1255 $string = rcube_idn_to_utf8($string); 1256 $mailto = rcube_idn_to_utf8($mailto); 1257 1257 1258 1258 if ($PRINT_MODE) { -
trunk/roundcubemail/program/steps/mail/sendmail.inc
r4410 r4484 154 154 // address in brackets without name (do nothing) 155 155 if (preg_match('/^<\S+@\S+>$/', $item)) { 156 $item = idn_to_ascii($item);156 $item = rcube_idn_to_ascii($item); 157 157 $result[] = $item; 158 158 // address without brackets and without name (add brackets) 159 159 } else if (preg_match('/^\S+@\S+$/', $item)) { 160 $item = idn_to_ascii($item);160 $item = rcube_idn_to_ascii($item); 161 161 $result[] = '<'.$item.'>'; 162 162 // address with name (handle name) … … 169 169 $name = '"'.addcslashes($name, '"').'"'; 170 170 } 171 $address = idn_to_ascii($address);171 $address = rcube_idn_to_ascii($address); 172 172 if (!preg_match('/^<\S+@\S+>$/', $address)) 173 173 $address = '<'.$address.'>'; -
trunk/roundcubemail/program/steps/settings/edit_identity.inc
r4410 r4484 95 95 } 96 96 97 $IDENTITY_RECORD['email'] = idn_to_utf8($IDENTITY_RECORD['email']);98 $IDENTITY_RECORD['reply-to'] = idn_to_utf8($IDENTITY_RECORD['reply-to']);99 $IDENTITY_RECORD['bcc'] = idn_to_utf8($IDENTITY_RECORD['bcc']);97 $IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']); 98 $IDENTITY_RECORD['reply-to'] = rcube_idn_to_utf8($IDENTITY_RECORD['reply-to']); 99 $IDENTITY_RECORD['bcc'] = rcube_idn_to_utf8($IDENTITY_RECORD['bcc']); 100 100 101 101 // Allow plugins to modify identity form content -
trunk/roundcubemail/program/steps/settings/func.inc
r4429 r4484 73 73 $list = $USER->list_identities(); 74 74 foreach ($list as $idx => $row) 75 $list[$idx]['mail'] = trim($row['name'] . ' <' . idn_to_utf8($row['email']) .'>');75 $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); 76 76 77 77 // get all identites from DB and define list of cols to be displayed -
trunk/roundcubemail/program/steps/settings/save_identity.inc
r4410 r4484 60 60 foreach (array('email', 'reply-to', 'bcc') as $item) { 61 61 if ($email = $save_data[$item]) { 62 $ascii_email = idn_to_ascii($email);62 $ascii_email = rcube_idn_to_ascii($email); 63 63 if (!check_email($ascii_email, false)) { 64 64 // show error message … … 78 78 79 79 if ($save_data['email']) 80 $save_data['email'] = idn_to_ascii($save_data['email']);80 $save_data['email'] = rcube_idn_to_ascii($save_data['email']); 81 81 if ($save_data['bcc']) 82 $save_data['bcc'] = idn_to_ascii($save_data['bcc']);82 $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); 83 83 if ($save_data['reply-to']) 84 $save_data['reply-to'] = idn_to_ascii($save_data['reply-to']);84 $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); 85 85 86 86 if (!$plugin['abort']) … … 117 117 $save_data = $plugin['record']; 118 118 119 $save_data['email'] = idn_to_ascii($save_data['email']);120 $save_data['bcc'] = idn_to_ascii($save_data['bcc']);121 $save_data['reply-to'] = idn_to_ascii($save_data['reply-to']);119 $save_data['email'] = rcube_idn_to_ascii($save_data['email']); 120 $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); 121 $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); 122 122 123 123 if (!$plugin['abort'])
Note: See TracChangeset
for help on using the changeset viewer.
