diff options
author | alecpl <alec@alec.pl> | 2011-02-03 13:58:07 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-02-03 13:58:07 +0000 |
commit | e8d5bdc84ecfdf6fe5008655215a258bbdf0c521 (patch) | |
tree | 24e98fca92b72bcc0ba4b5519f5d2c9265a7c8d5 /program/steps/settings | |
parent | 9ebac6616d32d7672ea59da67321380037e2324c (diff) |
- Fix IDNA support when IDN/INTL modules are in use (#1487742)
Diffstat (limited to 'program/steps/settings')
-rw-r--r-- | program/steps/settings/edit_identity.inc | 6 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/save_identity.inc | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index 9bf8dcae4..71bd349a3 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -94,9 +94,9 @@ function rcube_identity_form($attrib) $form['addressing']['content']['email']['class'] = 'disabled'; } - $IDENTITY_RECORD['email'] = idn_to_utf8($IDENTITY_RECORD['email']); - $IDENTITY_RECORD['reply-to'] = idn_to_utf8($IDENTITY_RECORD['reply-to']); - $IDENTITY_RECORD['bcc'] = idn_to_utf8($IDENTITY_RECORD['bcc']); + $IDENTITY_RECORD['email'] = rcube_idn_to_utf8($IDENTITY_RECORD['email']); + $IDENTITY_RECORD['reply-to'] = rcube_idn_to_utf8($IDENTITY_RECORD['reply-to']); + $IDENTITY_RECORD['bcc'] = rcube_idn_to_utf8($IDENTITY_RECORD['bcc']); // Allow plugins to modify identity form content $plugin = $RCMAIL->plugins->exec_hook('identity_form', array( diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 7f4e28255..271ee408a 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -72,7 +72,7 @@ function rcmail_identities_list($attrib) // get identities list and define 'mail' column $list = $USER->list_identities(); foreach ($list as $idx => $row) - $list[$idx]['mail'] = trim($row['name'] . ' <' . idn_to_utf8($row['email']) .'>'); + $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); // get all identites from DB and define list of cols to be displayed $plugin = $RCMAIL->plugins->exec_hook('identities_list', array( diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index e3bbce979..f0d25f35a 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -59,7 +59,7 @@ if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3) // Validate e-mail addresses foreach (array('email', 'reply-to', 'bcc') as $item) { if ($email = $save_data[$item]) { - $ascii_email = idn_to_ascii($email); + $ascii_email = rcube_idn_to_ascii($email); if (!check_email($ascii_email, false)) { // show error message $OUTPUT->show_message('emailformaterror', 'error', array('email' => $email), false); @@ -77,11 +77,11 @@ if ($_POST['_iid']) $save_data = $plugin['record']; if ($save_data['email']) - $save_data['email'] = idn_to_ascii($save_data['email']); + $save_data['email'] = rcube_idn_to_ascii($save_data['email']); if ($save_data['bcc']) - $save_data['bcc'] = idn_to_ascii($save_data['bcc']); + $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); if ($save_data['reply-to']) - $save_data['reply-to'] = idn_to_ascii($save_data['reply-to']); + $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); if (!$plugin['abort']) $updated = $USER->update_identity($iid, $save_data); @@ -116,9 +116,9 @@ else if (IDENTITIES_LEVEL < 2) $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data)); $save_data = $plugin['record']; - $save_data['email'] = idn_to_ascii($save_data['email']); - $save_data['bcc'] = idn_to_ascii($save_data['bcc']); - $save_data['reply-to'] = idn_to_ascii($save_data['reply-to']); + $save_data['email'] = rcube_idn_to_ascii($save_data['email']); + $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']); + $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); if (!$plugin['abort']) $insert_id = $save_data['email'] ? $USER->insert_identity($save_data) : null; |