Changeset 1678


Ignore:
Timestamp:
11/19/09 11:04:50 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Integração com antivirus, e gestão de quotas

Files:
1 added
5 edited

Legend:

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

    r1654 r1678  
    11421142                                                 $max_size .= "M"; 
    11431143 
    1144                                          $upload_max_filesize = str_replace("M","",$max_size) * 1024 * 1024; 
     1144                                        $upload_max_filesize = str_replace("M","",$max_size) * 1024 * 1024; 
    11451145 
    11461146                                        if ($_FILES['upload_file']['size'][$i] > $upload_max_filesize) 
     
    11481148                                                $this->messages[]=lang('The size of %1 has exceded the limit: %2', $this->disppath.'/'.$_FILES['upload_file']['name'][$i], $max_size); 
    11491149                                        } 
    1150                                         else 
     1150                                        else if(strlen($this->current_config['filemanager_antivirus_command']) > 0) 
     1151                                        { 
     1152                                                $command = "nice -n19 ".$this->current_config['filemanager_antivirus_command']." ".$_FILES['upload_file']['tmp_name'][$i]; 
     1153                                                exec("bash -c ".escapeshellcmd(escapeshellarg($command)),$output,$return); 
     1154                                                if ($return == 1) 
     1155                                                { 
     1156                                                        $this->messages[]=lang('Error:').lang('The file sent was considered infected'); 
     1157                                                        $this->readFilesInfo(); 
     1158                                                        $this->filelisting(); 
     1159                                                        return true; 
     1160                                                } 
     1161                                        } 
    11511162                                        if($_FILES['upload_file']['size'][$i] > 0) 
    11521163                                        { 
     
    12831294                                        else 
    12841295                                        { 
    1285                                                 $this->messages[] = lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 
     1296                                                $this->messages[] = lang('Error:').lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 
    12861297                                        } 
    12871298                                } 
  • sandbox/filemanager/inc/hook_admin.inc.php

    r1529 r1678  
    2626        $file = Array( 
    2727                'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), 
     28                'Quota management' => $GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiconfig.quota'), 
     29 
    2830        ); 
    2931//Do not modify below this line 
  • sandbox/filemanager/setup/phpgw_pt-br.lang

    r1648 r1678  
    2727created %1      filemanager     pt-br   Criado %1 
    2828You have no permission to access this file      filemanager     pt-br   Você não tem permissão para acessar este arquivo 
     29The file sent was considered infected   filemanager     pt-br   O arquivo enviado foi considerado infectado por vírus 
    2930no comments     filemanager     pt-br   sem comentários 
    3031created %1,%2   filemanager     pt-br   Criado %1, %2 
  • sandbox/filemanager/templates/default/config.tpl

    r1556 r1678  
    77<!-- END header --> 
    88<!-- BEGIN body --> 
    9     <tr bgcolor="{row_on}">               
    10     <td>{lang_Max_file_size}</td>                 
    11     <td>                  
     9    <tr bgcolor="{row_on}"> 
     10    <td>{lang_Max_file_size}</td> 
     11    <td> 
    1212    <input size="1" name="newsettings[filemanager_Max_file_size]" value="{value_filemanager_Max_file_size}">&nbsp;Mb 
    1313    </td> 
    1414    </tr> 
    15     <tr bgcolor="{row_off}">               
    16     <td>{lang_quota_size}</td>                 
    17     <td>                  
     15    <tr bgcolor="{row_off}"> 
     16    <td>{lang_quota_size}</td> 
     17    <td> 
    1818    <input size="2" name="newsettings[filemanager_quota_size]" value="{value_filemanager_quota_size}">&nbsp;Mb 
    1919    </td> 
    2020    </tr> 
     21    <tr bgcolor="{row_on}"> 
     22    <td>{lang_antivirus_command}</td>     
     23    <td> 
     24    <input size="50" name="newsettings[filemanager_antivirus_command]" value="{value_filemanager_antivirus_command}"> 
     25    </td> 
     26    </tr> 
     27 
    2128<!-- END body --> 
    2229<!-- BEGIN footer --> 
Note: See TracChangeset for help on using the changeset viewer.