summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-07-05 14:01:36 +0200
committerAleksander Machniak <alec@alec.pl>2014-07-05 14:01:36 +0200
commit43e9fc9499c54c7505acdcc780316fc54f037567 (patch)
tree46ca64eeaab3a66c787a324ced92858f18b8e4d5 /program/steps
parent740b8ea74a122e7988504ea17222bc969fe55813 (diff)
Skip redundant get_group() call for better performance of listing groups in compose addressbook
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 5efafdab0..77f11725f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -2112,11 +2112,10 @@ function rcmail_compose_contact_groups($abook, $source_id, $search = null, $sear
foreach ($abook->list_groups($search, $search_mode) as $group) {
$abook->reset();
$abook->set_group($group['ID']);
- $group_prop = $abook->get_group($group['ID']);
// group (distribution list) with email address(es)
- if ($group_prop['email']) {
- foreach ((array)$group_prop['email'] as $email) {
+ if ($group['email']) {
+ foreach ((array)$group['email'] as $email) {
$row_id = 'G'.$group['ID'];
$jsresult[$row_id] = format_email_recipient($email, $group['name']);
$OUTPUT->command('add_contact_row', $row_id, array(
@@ -2124,7 +2123,7 @@ function rcmail_compose_contact_groups($abook, $source_id, $search = null, $sear
}
}
// make virtual groups clickable to list their members
- else if ($group_prop['virtual']) {
+ else if ($group['virtual']) {
$row_id = 'G'.$group['ID'];
$OUTPUT->command('add_contact_row', $row_id, array(
'contactgroup' => html::a(array(