Changeset 1694 for sandbox/filemanager/inc/upload.php
- Timestamp:
- 11/23/09 10:58:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/upload.php
r1693 r1694 26 26 if($badchar = $bo->bad_chars($_FILES['upload_file']['name'][$i], True, True)) 27 27 { 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; 30 30 } 31 31 … … 44 44 if($fileinfo['mime_type'] == 'Directory') 45 45 { 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; 48 48 } 49 49 } … … 51 51 if ($_FILES['upload_file']['size'][$i] > ($upload_max_size*1024*1024)) 52 52 { 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; 55 55 } 56 56 else if(strlen($current_config['filemanager_antivirus_command']) > 0) … … 60 60 if ($return == 1) 61 61 { 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; 64 64 } 65 65 } … … 90 90 $bo->vfs->cp($tmp_arr); 91 91 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"; 93 93 } 94 94 else … … 110 110 )); 111 111 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"; 113 113 } 114 114 } … … 129 129 )); 130 130 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 132 133 } 133 134 }
Note: See TracChangeset
for help on using the changeset viewer.