Fix so number of contacts in a group is not limited to 200 when redirecting to mail composer from Contacts (#6972)

Use max_group_members with fallback to 999 if unset.
bnet/additions
Aleksander Machniak 5 years ago
parent 3bdcfc5623
commit 72959279e2

@ -29,6 +29,7 @@ CHANGELOG Roundcube Webmail
- Fix bug where listing tables in PostgreSQL database with db_prefix didn't work (#7093)
- Fix bug where 'text' attribute on body tag was ignored when displaying HTML message (#7109)
- Fix bug where next message wasn't displayed after delete in List mode (#7096)
- Fix so number of contacts in a group is not limited to 200 when redirecting to mail composer from Contacts (#6972)
RELEASE 1.4.1
-------------

@ -37,7 +37,7 @@ if ($RCMAIL->action == 'group-addmembers') {
$num2add = count($plugin['ids']);
if (!$plugin['abort']) {
if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($CONTACTS->count()->count + $num2add > $maxnum)) {
if (($maxnum = $RCMAIL->config->get('max_group_members')) && ($CONTACTS->count()->count + $num2add > $maxnum)) {
$OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
$OUTPUT->send();
}

@ -43,9 +43,11 @@ if (!empty($_REQUEST['_gid']) && isset($_REQUEST['_source'])) {
$mailto[] = format_email_recipient($group_data['email'][0], $group_data['name']);
}
else if ($CONTACTS->ready) {
$maxnum = (int) $RCMAIL->config->get('max_group_members');
$CONTACTS->set_group($group_id);
$CONTACTS->set_page(1);
$CONTACTS->set_pagesize(200); // limit somehow
$CONTACTS->set_pagesize($maxnum ?: 999);
$sources[] = $CONTACTS->list_records();
}
}

Loading…
Cancel
Save