[Svn] r4829 - trunk/roundcubemail/program/steps/settings

trac at roundcube.net trac at roundcube.net
Thu Jun 2 14:26:59 CEST 2011


Author: alec
Date: 2011-06-02 07:26:59 -0500 (Thu, 02 Jun 2011)
New Revision: 4829

Modified:
   trunk/roundcubemail/program/steps/settings/save_identity.inc
Log:
- Don't call rcube_idn_to_ascii() on empty data


Modified: trunk/roundcubemail/program/steps/settings/save_identity.inc
===================================================================
--- trunk/roundcubemail/program/steps/settings/save_identity.inc	2011-06-02 12:24:22 UTC (rev 4828)
+++ trunk/roundcubemail/program/steps/settings/save_identity.inc	2011-06-02 12:26:59 UTC (rev 4829)
@@ -116,9 +116,12 @@
   $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data));
   $save_data = $plugin['record'];
 
-  $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 ($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'])
     $insert_id = $save_data['email'] ? $USER->insert_identity($save_data) : null;
@@ -127,7 +130,7 @@
 
   if ($insert_id) {
     $OUTPUT->show_message('successfullysaved', 'confirmation', null, false);
-    
+
     $_GET['_iid'] = $insert_id;
 
     if (!empty($_POST['_standard']))

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list