Changeset 13076

Show
Ignore:
Timestamp:
10/24/07 19:30:18 (1 year ago)
Author:
bergie
Message:

Don't show the members chooser if there are too many of them

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.admin.user/config/config.inc

    r12731 r13076  
    33'schemadb_group' => 'file:/midcom/admin/user/config/schemadb_group.inc', 
    44'list_without_search' => 20, 
     5'list_users_max' => 30, 
    56'allow_manage_accounts' => true, // Turn this off if the accounts are integrated with some external source like AD or LDAP 
    67'search_fields' => array 
  • trunk/midcom/midcom.admin.user/handler/group/edit.php

    r12866 r13076  
    8989    { 
    9090        $this->_load_schemadb(); 
     91         
     92        $qb = midcom_db_member::new_query_builder(); 
     93        $qb->add_constraint('gid', '=', $this->_group->id); 
     94        if ($qb->count_unchecked() > $this->_config->get('list_users_max')) 
     95        { 
     96            unset($this->_schemadb['default']->fields['persons']); 
     97        } 
     98         
    9199        $this->_controller =& midcom_helper_datamanager2_controller::create('simple'); 
    92100        $this->_controller->schemadb =& $this->_schemadb; 
     
    118126        } 
    119127        $this->_group->require_do('midgard:update'); 
    120      
    121                  
     128                     
    122129        $data['asgard_toolbar'] = new midcom_helper_toolbar(); 
    123130