diff options
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/autocomplete.inc | 20 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index b42ebf87b..36542caec 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -29,8 +29,10 @@ if ($RCMAIL->action == 'group-expand') { $abook->set_group($gid); $abook->set_pagesize(1000); // TODO: limit number of group members by config $result = $abook->list_records(array('email','name')); - while ($result && ($sql_arr = $result->iterate())) - $members[] = format_email_recipient($sql_arr['email'], $sql_arr['name']); + while ($result && ($sql_arr = $result->iterate())) { + foreach ((array)$sql_arr['email'] as $email) + $members[] = format_email_recipient($email, $sql_arr['name']); + } $OUTPUT->command('replace_group_recipients', $gid, join(', ', $members)); } @@ -45,12 +47,14 @@ else if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_GPC, tr if ($result = $abook->search(array('email','name'), $search, false, true, true, 'email')) { while ($sql_arr = $result->iterate()) { - $contact = format_email_recipient($sql_arr['email'], $sql_arr['name']); - // when we've got more than one book, we need to skip duplicates - if ($books_num == 1 || !in_array($contact, $contacts)) { - $contacts[] = $contact; - if (count($contacts) >= $MAXNUM) - break 2; + foreach ((array)$abook->get_col_values('email', $sql_arr, true) as $email) { + $contact = format_email_recipient($email, $sql_arr['name']); + // when we've got more than one book, we need to skip duplicates + if ($books_num == 1 || !in_array($contact, $contacts)) { + $contacts[] = $contact; + if (count($contacts) >= $MAXNUM) + break 2; + } } } } diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 2b342a9f0..335945c5c 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1133,7 +1133,7 @@ function rcmail_compose_attachment_form($attrib) $out = html::div($attrib, $OUTPUT->form_tag(array('name' => 'uploadform', 'method' => 'post', 'enctype' => 'multipart/form-data'), - html::div(null, rcmail_compose_attachment_field(array('size' => $attrib[attachmentfieldsize]))) . + html::div(null, rcmail_compose_attachment_field(array('size' => $attrib['attachmentfieldsize']))) . html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . html::div('buttons', $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . |