summaryrefslogtreecommitdiff
path: root/program/steps/mail/autocomplete.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-09 10:03:54 +0000
committeralecpl <alec@alec.pl>2011-11-09 10:03:54 +0000
commit51f7a5b2a09777d3a279757af620e42985ff9a86 (patch)
tree1b4700d4e4f3e5277dcb9877118acc1ee9098b74 /program/steps/mail/autocomplete.inc
parent69cb80b0594add4d18f8de6b5c676f1dc4d0a835 (diff)
- Apply fixes from trunk up to r5401
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;