summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/autocomplete.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc
index b761f5398..4e6c617d3 100644
--- a/program/steps/mail/autocomplete.inc
+++ b/program/steps/mail/autocomplete.inc
@@ -31,7 +31,7 @@ if ($RCMAIL->action == 'group-expand') {
$result = $abook->list_records(array('email','name'));
while ($result && ($sql_arr = $result->iterate()))
$members[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
-
+
$OUTPUT->command('replace_group_recipients', $gid, join(', ', $members));
}
}
@@ -42,21 +42,21 @@ else if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_GPC, tr
$abook = $RCMAIL->get_address_book($id);
$abook->set_pagesize($MAXNUM);
- if ($result = $abook->search(array('email','name'), $search, false, true, true)) {
+ if ($result = $abook->search(array('email','name'), $search, false, true, true, 'email')) {
while ($sql_arr = $result->iterate()) {
$contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
if (count($contacts) >= $MAXNUM)
break 2;
}
}
-
+
// also list matching contact groups
if ($abook->groups) {
foreach ($abook->list_groups($search) as $group) {
$abook->reset();
$abook->set_group($group['ID']);
$result = $abook->count();
-
+
if ($result->count) {
$contacts[] = array('name' => $group['name'] . ' (' . intval($result->count) . ')', 'id' => $group['ID'], 'source' => $id);
if (count($contacts) >= $MAXNUM)
@@ -65,7 +65,7 @@ else if ($book_types && $search = get_input_value('_search', RCUBE_INPUT_GPC, tr
}
}
}
-
+
usort($contacts, 'contact_results_sort');
}