Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1553,7 +1553,8 @@ |
1554 | 1554 | 'importhistoryconflict', |
1555 | 1555 | 'importnosources', |
1556 | 1556 | 'importnofile', |
1557 | | - 'importuploaderror', |
| 1557 | + 'importuploaderrorsize', |
| 1558 | + 'importuploaderrorpartial', |
1558 | 1559 | ), |
1559 | 1560 | 'importlog' => array( |
1560 | 1561 | 'importlogpage', |
Index: trunk/phase3/includes/SpecialImport.php |
— | — | @@ -850,7 +850,15 @@ |
851 | 851 | return new WikiErrorMsg( 'importnofile' ); |
852 | 852 | } |
853 | 853 | if( !empty( $upload['error'] ) ) { |
854 | | - return new WikiErrorMsg( 'importuploaderror', $upload['error'] ); |
| 854 | + switch($upload['error']){ |
| 855 | + case 1: # The uploaded file exceeds the upload_max_filesize directive in php.ini. |
| 856 | + return new WikiErrorMsg( 'importuploaderror' ); |
| 857 | + case 2: # The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form. |
| 858 | + return new WikiErrorMsg( 'importuploaderrorsize' ); |
| 859 | + case 3: # The uploaded file was only partially uploaded |
| 860 | + return new WikiErrorMsg( 'importuploaderrorpartial' ); |
| 861 | + } |
| 862 | + |
855 | 863 | } |
856 | 864 | $fname = $upload['tmp_name']; |
857 | 865 | if( is_uploaded_file( $fname ) ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2301,7 +2301,8 @@ |
2302 | 2302 | 'importhistoryconflict' => 'Conflicting history revision exists (may have imported this page before)', |
2303 | 2303 | 'importnosources' => 'No transwiki import sources have been defined and direct history uploads are disabled.', |
2304 | 2304 | 'importnofile' => 'No import file was uploaded.', |
2305 | | -'importuploaderror' => 'Upload of import file failed; perhaps the file is bigger than the allowed upload size.', |
| 2305 | +'importuploaderrorsize' => 'Upload of import file failed. The file is bigger than the allowed upload size.', |
| 2306 | +'importuploaderrorpartial' => 'Upload of import file failed. The file was only partially uploaded.', |
2306 | 2307 | |
2307 | 2308 | # Import log |
2308 | 2309 | 'importlogpage' => 'Import log', |