Ignore:
Timestamp:
06/27/12 13:00:55 (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
  • branches/2.4/expressoAdmin1_2/inc/class.user.inc.php

    r6186 r6660  
    3636                        $return['status'] = true; 
    3737                 
     38                        if($this->db_functions->use_cota_control()) {  
     39                                                //Verifica quota de usuários e disco              
     40                                                $setor = $this->functions->get_info($params['context']);  
     41                                                if (!$this->functions->existe_quota_usuario($setor[0])) {  
     42                                                        $return['status'] = false;  
     43                                                        $return['msg'] = $this->functions->lang("user cota exceeded");//TODO colocar valor de acordo com tabela de traduções.  
     44                                                        return $return;  
     45                                                }   
     46                                                if (!$this->functions->existe_quota_disco($setor[0],$params['mailquota'])) {  
     47                                                        $return['status'] = false;  
     48                                                        $return['msg'] = $this->functions->lang("disk cota exceeded");//TODO colocar valor de acordo com tabela de traduções.  
     49                                                        return $return;                           
     50                                                }  
     51                         }  
     52                                  
    3853                        // Verifica o acesso do gerente 
    3954                        if ($this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'add_users')) 
     
    303318                        */ 
    304319 
     320                        //Verifica quota de disco, como estou alterando, não preciso checar quota de usuários.  
     321                        if($this->db_functions->use_cota_control()) {             
     322                                $setor = $this->functions->get_info($new_values['context']);  
     323                                if (!$this->functions->existe_quota_disco($setor[0],$new_values['mailquota'])) {  
     324                                        $return['status'] = false;  
     325                                        $return['msg'] = "Quota em disco excedida...";//TODO colocar valor de acordo com tabela de traduções.  
     326                                        return $return;                           
     327                                }  
     328                        }  
     329                  
    305330                        $manager_account_lid = $_SESSION['phpgw_session']['session_lid']; 
    306331                        if ((!$this->functions->check_acl($manager_account_lid,'edit_users')) && 
Note: See TracChangeset for help on using the changeset viewer.