summaryrefslogtreecommitdiff
path: root/program/steps/mail/addcontact.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-10 07:57:56 +0000
committeralecpl <alec@alec.pl>2011-11-10 07:57:56 +0000
commitf21a04c024e57d2396c6a8ab78b055de098217ee (patch)
tree142979e9d62db88f361587bb2617eb31e1e7207a /program/steps/mail/addcontact.inc
parent81f5dd7774119e6f35f4594a68b25e53a22e65f2 (diff)
- Add option to define matching method for addressbook search (#1486564, #1487907)
Diffstat (limited to 'program/steps/mail/addcontact.inc')
-rw-r--r--program/steps/mail/addcontact.inc6
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');