diff options
author | thomascube <thomas@roundcube.net> | 2011-11-08 18:50:08 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-11-08 18:50:08 +0000 |
commit | 62c86187444721317c7f3bcb2edb469f00ca0971 (patch) | |
tree | f1b53fac6c240bcd935d4213c2a0258b209e53ed /program/steps/mail/autocomplete.inc | |
parent | 9230525d98bc58c26c78412de507a9d8d0a77fc9 (diff) |
Make email recipients separator configurable + suppress dupes in auto-completion
Diffstat (limited to 'program/steps/mail/autocomplete.inc')
-rw-r--r-- | program/steps/mail/autocomplete.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index 5b935ad2c..8b13f574d 100644 --- a/program/steps/mail/autocomplete.inc +++ b/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; |