diff options
Diffstat (limited to 'program/steps/mail/addcontact.inc')
-rw-r--r-- | program/steps/mail/addcontact.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc index dafb2763c..a4feb7b58 100644 --- a/program/steps/mail/addcontact.inc +++ b/program/steps/mail/addcontact.inc @@ -50,7 +50,7 @@ if (!empty($_POST['_address']) && is_object($CONTACTS)) $OUTPUT->show_message('errorsavingcontact', 'error'); $OUTPUT->send(); } - + $email = rcube_idn_to_ascii($contact['email']); if (!check_email($email, false)) { $OUTPUT->show_message('emailformaterror', 'error', array('email' => $contact['email'])); @@ -65,13 +65,13 @@ if (!empty($_POST['_address']) && is_object($CONTACTS)) $error = $CONTACTS->get_error(); // TODO: show dialog to complete record // if ($error['type'] == rcube_addressbook::ERROR_VALIDATE) { } - + $OUTPUT->show_message($error['message'] ? $error['message'] : 'errorsavingcontact', 'error'); $OUTPUT->send(); } // check for existing contacts - $existing = $CONTACTS->search('email', $contact['email'], true, false); + $existing = $CONTACTS->search('email', $contact['email'], 1, false); if ($done = $existing->count) $OUTPUT->show_message('contactexists', 'warning'); |