Changeset 4381


Ignore:
Timestamp:
05/12/11 16:20:18 (13 years ago)
Author:
niltonneto
Message:

Ticket #1832 - Nao seta cota padrao caso controle de cotas esteja ativado

Location:
trunk/filemanager
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/filemanager/inc/class.uifilemanager.inc.php

    r4375 r4381  
    182182                $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->basedir . $this->bo->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 
    183183                if ($test[mime_type] != 'Directory') { 
     184                         
     185                        $c_admin = CreateObject('phpgwapi.config', 'expressoAdmin1_2'); 
     186                        $c_admin->read_repository(); 
     187                        if($c_admin->config_data['expressoAdmin_cotasOu']) 
     188                                $this->generate_error(lang("You have access to the application, but you have no quota. Please contact your administrator")); 
     189                         
    184190                        $this->bo->vfs->override_acl = 1; 
    185191 
     
    206212                        } 
    207213                } 
     214                 
     215        } 
     216 
     217        function generate_error($error) { 
     218                $template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/filemanager/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 
     219                $template->set_file( 
     220                                Array( 
     221                                        'error_model' => 'errors.tpl' 
     222                                ) 
     223                        ); 
     224                $template->set_block('error_model','error_page'); 
     225                $template->set_var("errors",$error); 
     226                $GLOBALS['phpgw_info']['flags'] = array 
     227                         ( 
     228                         'currentapp' => 'filemanager', 
     229                         'noheader' => False, 
     230                         'nonavbar' => False, 
     231                         'nofooter' => False, 
     232                         'noappheader' => False, 
     233                         'enable_browser_class' => True 
     234                ); 
     235                $GLOBALS['phpgw']->common->phpgw_header(); 
     236                $template->pfp('out','error_page'); 
     237                $GLOBALS['phpgw']->common->phpgw_footer(); 
     238                $GLOBALS['phpgw']->common->phpgw_exit(); 
    208239        } 
    209240 
  • trunk/filemanager/setup/phpgw_pt-br.lang

    r3899 r4381  
    214214You do not have Java installed, plugin not loaded       filemanager     pt-br   Você não tem o Java instalado, o plugin não foi iniciado 
    215215Your Home Dir did not exist, eGroupWare created a new one.      filemanager     pt-br   Seu Diretório Home não existia, foi criado um novo. 
     216You have access to the application, but you have no quota. Please contact your administrator    filemanager     pt-br   Você tem acesso ao módulo, mas não possui cota. Por favor, contacte o administrador. 
    216217You must choose a folder !      filemanager     pt-br   Você deve escolher uma pasta ! 
    217218Filemanager notification        filemanager     pt-br   Gerenciador de arquivos notifica 
  • trunk/filemanager/templates/default/errors.tpl

    r3019 r4381  
    11<!-- BEGIN error_page --> 
    2 {errors} 
     2<center><font color="#FF0000" size="3">{errors}</font></center> 
    33<!-- END error_page --> 
    44<!-- BEGIN ind_error --> 
Note: See TracChangeset for help on using the changeset viewer.