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

File:
1 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                                } 
Note: See TracChangeset for help on using the changeset viewer.