Ignore:
Timestamp:
06/20/12 12:31:51 (12 years ago)
Author:
eduardow
Message:

Ticket #2863 - Backport da funcionalidade de Controle de Cotas de usuário e disco(Cotas OU).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/inc/class.bosectors.inc.php

    r5133 r6553  
    4747                        $sector_info['objectClass'][0]  = 'top'; 
    4848                        $sector_info['objectClass'][1]  = 'organizationalUnit'; 
     49 
     50                        /*Insere as informações sobre quota total por usuários e por gigabytes de espaço em disco   
     51                         Se não vierem os dados, ele coloca 0 (Caso não exista controle de cota).  
     52                        */  
     53                        $sector_info['diskQuota'] = isset($_POST['disk_quota']) ? $_POST['disk_quota'] : "0";  
     54                        $sector_info['usersQuota'] = isset($_POST['users_quota']) ? $_POST['users_quota'] : "0";  
     55 
    4956 
    5057                        $systemName = $GLOBALS['phpgw_info']['server']['system_name']; 
     
    98105                                $this->so->add_attribute($sector_info[0]['dn'], $ldap_mod_add); 
    99106                        } 
    100                         else 
     107                        elseif($sector_info['phpgwaccountvisible'] == '-1')  
    101108                        { 
    102109                                $ldap_mod_del['objectClass'] = 'phpgwAccount'; 
    103110                                $ldap_mod_del['phpgwaccountvisible'] = array(); 
    104111                                $this->so->remove_attribute($sector_info[0]['dn'], $ldap_mod_del); 
     112                        }  
     113                                          
     114                        //Modifica o conteúdo das cotas.  
     115                        if( (isset($_POST['disk_quota']) ) && (isset($_POST['users_quota']) ) ) { //se for passado alguma coisa, lógico  
     116                                $ldap_mod_replace = array();  
     117                                $ldap_mod_replace['diskQuota'] = $_POST['disk_quota'];  
     118                                $ldap_mod_replace['usersQuota'] = $_POST['users_quota'];  
     119                                $this->so->replace_attribute($sector_info[0]['dn'], $ldap_mod_replace);  
    105120                        } 
    106121                         
Note: See TracChangeset for help on using the changeset viewer.