Ignore:
Timestamp:
Apr 6, 2010 2:40:45 AM (3 years ago)
Author:
thomasb
Message:

Configurable limit of address group members

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/addressbook/groups.inc

    r3459 r3470  
    3232    $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array('group_id' => $gid, 'ids' => $ids, 'source' => $source)); 
    3333     
    34     if (!$plugin['abort'] && $CONTACTS->add_to_group($gid, $plugin['ids'])) 
     34    $CONTACTS->set_group($gid); 
     35    $num2add = count(explode(',', $plugin['ids'])); 
     36     
     37    if (!$plugin['abort'] && ($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($CONTACTS->count()->count + $num2add > $maxnum)) 
     38      $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum)); 
     39    else if (!$plugin['abort'] && $CONTACTS->add_to_group($gid, $plugin['ids'])) 
    3540      $OUTPUT->show_message('contactaddedtogroup'); 
    3641    else if ($plugin['message']) 
Note: See TracChangeset for help on using the changeset viewer.