Append .txt to import files rather than .import. Props donncha
git-svn-id: http://svn.automattic.com/wordpress/trunk@10611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
37cbe1b939
commit
74b9642857
|
@ -92,6 +92,7 @@ foreach ($categories as $category) {
|
||||||
$blogrolling = true;
|
$blogrolling = true;
|
||||||
} else { // try to get the upload file.
|
} else { // try to get the upload file.
|
||||||
$overrides = array('test_form' => false, 'test_type' => false);
|
$overrides = array('test_form' => false, 'test_type' => false);
|
||||||
|
$_FILES['userfile']['name'] .= '.txt';
|
||||||
$file = wp_handle_upload($_FILES['userfile'], $overrides);
|
$file = wp_handle_upload($_FILES['userfile'], $overrides);
|
||||||
|
|
||||||
if ( isset($file['error']) )
|
if ( isset($file['error']) )
|
||||||
|
|
|
@ -60,7 +60,7 @@ function wp_import_cleanup( $id ) {
|
||||||
*/
|
*/
|
||||||
function wp_import_handle_upload() {
|
function wp_import_handle_upload() {
|
||||||
$overrides = array( 'test_form' => false, 'test_type' => false );
|
$overrides = array( 'test_form' => false, 'test_type' => false );
|
||||||
$_FILES['import']['name'] .= '.import';
|
$_FILES['import']['name'] .= '.txt';
|
||||||
$file = wp_handle_upload( $_FILES['import'], $overrides );
|
$file = wp_handle_upload( $_FILES['import'], $overrides );
|
||||||
|
|
||||||
if ( isset( $file['error'] ) )
|
if ( isset( $file['error'] ) )
|
||||||
|
|
Loading…
Reference in New Issue