Changeset 1745


Ignore:
Timestamp:
12/04/09 08:03:32 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorias no módulos gerenciador de arquivos do expresso livre

Location:
sandbox/filemanager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/upload.php

    r1741 r1745  
    1919$upload_max_size = $current_config['filemanager_Max_file_size']; 
    2020$path = base64_decode($_POST['path']); 
    21 $show_upload_boxes = $_POST['show_upload_boxes']; 
     21$show_upload_boxes = count($_FILES['upload_file']['name'])-1; 
     22 
     23/* Its much faster test all files only one time */ 
     24if(strlen($current_config['filemanager_antivirus_command']) > 0) 
     25{ 
     26        $command = "nice -n19 ".$current_config['filemanager_antivirus_command']; 
     27        for($i = 0; $i != $show_upload_boxes; $i++) 
     28                $command .= " ".$_FILES['upload_file']['tmp_name'][$i]; 
     29        $return=0; 
     30        exec("bash -c ".escapeshellcmd(escapeshellarg($command)),$output,$return); 
     31        if ($return == 1) 
     32        { 
     33                $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('One of the files sent was considered infected'); 
     34                return; 
     35        } 
     36} 
    2237 
    2338if($path != '/') 
     
    5469                        continue; 
    5570                } 
    56                 else if(strlen($current_config['filemanager_antivirus_command']) > 0) 
    57                 { 
    58                         $command = "nice -n19 ".$current_config['filemanager_antivirus_command']." ".$_FILES['upload_file']['tmp_name'][$i]; 
    59                         exec("bash -c ".escapeshellcmd(escapeshellarg($command)),$output,$return); 
    60                         if ($return == 1) 
    61                         { 
    62                                 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('The file %1 sent was considered infected',$_FILES['upload_file']['name'][$i]); 
    63                                 continue; 
    64                         } 
    65                 } 
    66                 if($_FILES['upload_file']['size'][$i] > 0) 
     71                elseif($_FILES['upload_file']['size'][$i] > 0) 
    6772                { 
    6873                        if($fileinfo['name'] && $fileinfo['deleteable'] != 'N') 
  • sandbox/filemanager/setup/phpgw_pt-br.lang

    r1741 r1745  
    2929created %1      filemanager     pt-br   Criado %1 
    3030You have no permission to access this file      filemanager     pt-br   Você não tem permissão para acessar este arquivo 
    31 The file %1 sent was considered infected        filemanager     pt-bt   o arquivo (%1) enviado foi considerado infectado por vírus 
     31One of the files sent was considered infected   filemanager     pt-bt   Um dos arquivos enviados foi considerado infectado por vírus 
    3232Note: Uploaded is limited to %1MB       filemanager     pt-br   Nota: O tamanho máximo de envio é limitado a %1MB 
    3333This property will change the visibility of all users that have access to this file, continue?  filemanager     pt-br   Esta propriedade altera visibilidade dos usuários que estão compartilhados, deseja continuar? 
Note: See TracChangeset for help on using the changeset viewer.