Ignore:
Timestamp:
11/23/09 10:58:52 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorias no módulo gerenciados de arquivos

File:
1 edited

Legend:

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

    r1693 r1694  
    2626                if($badchar = $bo->bad_chars($_FILES['upload_file']['name'][$i], True, True)) 
    2727                { 
    28                         $_SESSION['response'] = lang('Error:').lang('File names cannot contain "%1"', $badchar); 
    29                         return; 
     28                        $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('File names cannot contain "%1"', $badchar); 
     29                        continue; 
    3030                } 
    3131 
     
    4444                        if($fileinfo['mime_type'] == 'Directory') 
    4545                        { 
    46                                 $_SESSION['response'] = lang('Error:').lang('Cannot replace %1 because it is a directory', $fileinfo['name']); 
    47                                 return; 
     46                                $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Cannot replace %1 because it is a directory', $fileinfo['name']); 
     47                                continue; 
    4848                        } 
    4949                } 
     
    5151                if ($_FILES['upload_file']['size'][$i] > ($upload_max_size*1024*1024)) 
    5252                { 
    53                         $_SESSION['response'] = lang('The size of %1 has exceded the limit: %2', $_FILES['upload_file']['name'][$i], $upload_max_size); 
    54                         return; 
     53                        $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('The size of %1 has exceded the limit: %2', $_FILES['upload_file']['name'][$i], $upload_max_size); 
     54                        continue; 
    5555                } 
    5656                else if(strlen($current_config['filemanager_antivirus_command']) > 0) 
     
    6060                        if ($return == 1) 
    6161                        { 
    62                                  $_SESSION['response'] = lang('Error:').lang('The file %1 sent was considered infected',$_FILES['upload_file']['name'][$i]); 
    63                                 return; 
     62                                $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('The file %1 sent was considered infected',$_FILES['upload_file']['name'][$i]); 
     63                                continue; 
    6464                        } 
    6565                } 
     
    9090                                $bo->vfs->cp($tmp_arr); 
    9191 
    92                                  $_SESSION['response'] .= lang('Created new %1', $_FILES['upload_file']['name'][$i])."\n"; 
     92                                $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created new %1', $_FILES['upload_file']['name'][$i])."\n"; 
    9393                        } 
    9494                        else 
     
    110110                                )); 
    111111 
    112                                  $_SESSION['response'] .= lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $_FILES['upload_file']['size'][$i])."\n"; 
     112                                 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $_FILES['upload_file']['size'][$i])."\n"; 
    113113                        } 
    114114                } 
     
    129129                        )); 
    130130 
    131                          $_SESSION['response'] .= lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $file_size[$i])."\n"; 
     131                         $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $file_size[$i])."\n"; 
     132 
    132133                } 
    133134        } 
Note: See TracChangeset for help on using the changeset viewer.