diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-08 18:50:08 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-08 18:50:08 +0000 |
| commit | 4d4180e13b0620f3713ca1d672b3cc256b4097fa (patch) | |
| tree | 5c808c20c1721eed1a194f1d7bcf4231d03cb194 /roundcubemail/program/steps/mail/autocomplete.inc | |
| parent | 02c8e2df5363161da7cdd18927ebeb5551df6c39 (diff) | |
Make email recipients separator configurable + suppress dupes in auto-completion
git-svn-id: https://svn.roundcube.net/trunk@5401 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/autocomplete.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/autocomplete.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/autocomplete.inc b/roundcubemail/program/steps/mail/autocomplete.inc index 5b935ad2c..8b13f574d 100644 --- a/roundcubemail/program/steps/mail/autocomplete.inc +++ b/roundcubemail/program/steps/mail/autocomplete.inc @@ -32,7 +32,8 @@ if ($RCMAIL->action == 'group-expand') { $members[] = format_email_recipient($email, $sql_arr['name']); } - $OUTPUT->command('replace_group_recipients', $gid, join(', ', $members)); + $separator = trim($RCMAIL->config->get('recipients_separator', ',')) . ' '; + $OUTPUT->command('replace_group_recipients', $gid, join($separator, array_unique($members))); } $OUTPUT->send(); @@ -70,8 +71,8 @@ if (!empty($book_types) && strlen($search)) { if ($email_cnt > 1 && stripos($contact, $search) === false) { continue; } - // when we've got more than one book, we need to skip duplicates - if ($books_num == 1 || !in_array($contact, $contacts)) { + // skip duplicates + if (!in_array($contact, $contacts)) { $contacts[] = $contact; if (count($contacts) >= $MAXNUM) break 2; |
