diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-25 15:34:29 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-25 15:34:29 +0000 |
| commit | 0272fac2f7af3a930d6fd2288f590c27470e13b3 (patch) | |
| tree | f74b6ce01fdfddf282ec72340a760fab52c6bbd0 /roundcubemail/program/steps | |
| parent | a584f17c86e68e3670126b7f4461d78b3f16e45b (diff) | |
Allow multiple records with same e-mail address but show notice to the user
git-svn-id: https://svn.roundcube.net/trunk@4572 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/addressbook/save.inc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/roundcubemail/program/steps/addressbook/save.inc b/roundcubemail/program/steps/addressbook/save.inc index aa45a4e15..2884aa418 100644 --- a/roundcubemail/program/steps/addressbook/save.inc +++ b/roundcubemail/program/steps/addressbook/save.inc @@ -204,22 +204,15 @@ if (!empty($cid)) // insert a new contact else { - // check for existing contacts + // show notice if existing contacts with same e-mail are found $existing = false; foreach ($CONTACTS->get_col_values('email', $a_record, true) as $email) { - if (($res = $CONTACTS->search('email', $email, true, false)) && $res->count) { - $existing = true; + if (($res = $CONTACTS->search('email', $email, false, false)) && $res->count) { + $OUTPUT->show_message('contactexists', 'notice', null, false); break; } } - // show warning message - if ($existing) { - $OUTPUT->show_message('contactexists', 'warning', null, false); - rcmail_overwrite_action('add'); - return; - } - $plugin = $RCMAIL->plugins->exec_hook('contact_create', array( 'record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); $a_record = $plugin['record']; |
