Changeset 1804 for sandbox/filemanager/inc/upload.php
- Timestamp:
- 12/10/09 15:26:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/upload.php
r1745 r1804 31 31 if ($return == 1) 32 32 { 33 $_SESSION[' phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('One of the files sent was considered infected');33 $_SESSION['response'] = serialize(array(0 => lang('Error:').lang('One of the files sent was considered infected'))); 34 34 return; 35 35 } … … 41 41 if($badchar = $bo->bad_chars($_FILES['upload_file']['name'][$i], True, True)) 42 42 { 43 $ _SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('File names cannot contain "%1"', $badchar);43 $return[] = lang('Error:').lang('File names cannot contain "%1"', $badchar); 44 44 continue; 45 45 } … … 59 59 if($fileinfo['mime_type'] == 'Directory') 60 60 { 61 $ _SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Cannot replace %1 because it is a directory', $fileinfo['name']);61 $return[] = lang('Error:').lang('Cannot replace %1 because it is a directory', $fileinfo['name']); 62 62 continue; 63 63 } … … 66 66 if ($_FILES['upload_file']['size'][$i] > ($upload_max_size*1024*1024)) 67 67 { 68 $ _SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('The size of %1 has exceded the limit: %2', $_FILES['upload_file']['name'][$i], $upload_max_size);68 $return[] = lang('The size of %1 has exceded the limit: %2', $_FILES['upload_file']['name'][$i], $upload_max_size); 69 69 continue; 70 70 } … … 94 94 ); 95 95 $bo->vfs->cp($tmp_arr); 96 97 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created new %1', $_FILES['upload_file']['name'][$i])."\n";98 96 } 99 97 else … … 114 112 )); 115 113 else{ 116 $ _SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Your quota has exceeded the limit');114 $return[] = lang('Error:').lang('Your quota has exceeded the limit'); 117 115 return false; 118 116 } 119 117 120 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $bo->borkb($_FILES['upload_file']['size'][$i]))."\n";121 118 } 122 119 } … … 137 134 )); 138 135 139 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $bo->borkb($file_size[$i]))."\n";140 141 136 } 142 137 } 138 if (count($return) > 0) 139 $_SESSION['response'] = serialize($return); 140 else 141 $_SESSION['response'] = serialize( array( 0 => 'Ok' ) ); 143 142 ?>
Note: See TracChangeset
for help on using the changeset viewer.