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

git-svn-id: https://develop.svn.wordpress.org/trunk@10611 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-02-20 21:39:20 +00:00
parent f66c061b5f
commit 4fca589936
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'] ) )