Roundcube Community Forum

SVN Releases => Issues & Bugs => Topic started by: mikeloco on January 07, 2015, 05:08:59 AM

Title: Max number of group members - bug
Post by: mikeloco on January 07, 2015, 05:08:59 AM
Hi,
I am able to add new contact in a group even though I limited this in a configuration file $config['max_group_members'] = 10;

The problem is in a program\steps\addressbook\save.inc row 228:
Code: [Select]
if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum))
    $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
$CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']);

If I add else, the problem is solved

Code: [Select]
if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum))
    $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
else
    $CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']);

Is it possible to resolve this in a feature release?

BR,
Miodrag
Title: Re: Max number of group members - bug
Post by: alec on January 07, 2015, 10:21:07 AM
Yes, ticket created. http://trac.roundcube.net/ticket/1490214