Append .txt to import files rather than .import. Props donncha

git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-02-20 21:39:32 +00:00
parent 1752026950
commit 91b2a262ba
2 changed files with 2 additions and 1 deletions

View File

@ -92,6 +92,7 @@ foreach ($categories as $category) {
$blogrolling = true;
} else { // try to get the upload file.
$overrides = array('test_form' => false, 'test_type' => false);
$_FILES['userfile']['name'] .= '.txt';
$file = wp_handle_upload($_FILES['userfile'], $overrides);
if ( isset($file['error']) )

View File

@ -60,7 +60,7 @@ function wp_import_cleanup( $id ) {
*/
function wp_import_handle_upload() {
$overrides = array( 'test_form' => false, 'test_type' => false );
$_FILES['import']['name'] .= '.import';
$_FILES['import']['name'] .= '.txt';
$file = wp_handle_upload( $_FILES['import'], $overrides );
if ( isset( $file['error'] ) )