From 4d4180e13b0620f3713ca1d672b3cc256b4097fa Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 8 Nov 2011 18:50:08 +0000 Subject: Make email recipients separator configurable + suppress dupes in auto-completion git-svn-id: https://svn.roundcube.net/trunk@5401 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/autocomplete.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'roundcubemail/program/steps/mail/autocomplete.inc') 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; -- cgit v1.2.3