summaryrefslogtreecommitdiff
path: root/program/steps/settings/save_identity.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-08-13 21:59:54 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-08-13 21:59:54 +0200
commitb8b6e5011a0f87f137870fbf328bcdb8ff3bbbfa (patch)
tree88c3d728a081d5eed84764e347a6573b1bdd9503 /program/steps/settings/save_identity.inc
parentd97118f8eff58660294370eb515a1970a5d0c8b6 (diff)
Skip IDN conversion when saving/reading identies. This should provide proper support for multiple recipeint values including name blocks in bcc and reply-to fields
Diffstat (limited to 'program/steps/settings/save_identity.inc')
-rw-r--r--program/steps/settings/save_identity.inc15
1 files changed, 3 insertions, 12 deletions
diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc
index dba143dd8..8515c44f1 100644
--- a/program/steps/settings/save_identity.inc
+++ b/program/steps/settings/save_identity.inc
@@ -58,8 +58,8 @@ if (IDENTITIES_LEVEL == 1 || IDENTITIES_LEVEL == 3)
// Validate e-mail addresses
$email_checks = array(rcube_idn_to_ascii($save_data['email']));
foreach (array('reply-to', 'bcc') as $item) {
- foreach (rcube_mime::decode_address_list(rcube_idn_to_ascii($save_data[$item]), null, false) as $rcpt)
- $email_checks[] = $rcpt['mailto'];
+ foreach (rcube_mime::decode_address_list($save_data[$item], null, false) as $rcpt)
+ $email_checks[] = rcube_idn_to_ascii($rcpt['mailto']);
}
foreach ($email_checks as $email) {
@@ -80,11 +80,6 @@ if ($_POST['_iid'])
if ($save_data['email'])
$save_data['email'] = rcube_idn_to_ascii($save_data['email']);
- if ($save_data['bcc'])
- $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']);
- if ($save_data['reply-to'])
- $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']);
-
if (!$plugin['abort'])
$updated = $RCMAIL->user->update_identity($iid, $save_data);
else
@@ -119,11 +114,7 @@ else if (IDENTITIES_LEVEL < 2)
$save_data = $plugin['record'];
if ($save_data['email'])
- $save_data['email'] = rcube_idn_to_ascii($save_data['email']);
- if ($save_data['bcc'])
- $save_data['bcc'] = rcube_idn_to_ascii($save_data['bcc']);
- if ($save_data['reply-to'])
- $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']);
+ $save_data['email'] = rcube_idn_to_ascii($save_data['email']);
if (!$plugin['abort'])
$insert_id = $save_data['email'] ? $RCMAIL->user->insert_identity($save_data) : null;