summaryrefslogtreecommitdiff
path: root/program/steps/mail/autocomplete.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/autocomplete.inc')
-rw-r--r--program/steps/mail/autocomplete.inc7
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;