diff -r a4642baaf829 -r 4d4862461b8d web/wp-admin/includes/import.php --- a/web/wp-admin/includes/import.php Tue Feb 02 14:45:47 2010 +0000 +++ b/web/wp-admin/includes/import.php Tue Feb 02 15:44:16 2010 +0000 @@ -1,87 +1,92 @@ - false, 'test_type' => false ); - $_FILES['import']['name'] .= '.txt'; - $file = wp_handle_upload( $_FILES['import'], $overrides ); - - if ( isset( $file['error'] ) ) - return $file; - - $url = $file['url']; - $type = $file['type']; - $file = addslashes( $file['file'] ); - $filename = basename( $file ); - - // Construct the object array - $object = array( 'post_title' => $filename, - 'post_content' => $url, - 'post_mime_type' => $type, - 'guid' => $url - ); - - // Save the data - $id = wp_insert_attachment( $object, $file ); - - return array( 'file' => $file, 'id' => $id ); -} - -?> + false, 'test_type' => false ); + $_FILES['import']['name'] .= '.txt'; + $file = wp_handle_upload( $_FILES['import'], $overrides ); + + if ( isset( $file['error'] ) ) + return $file; + + $url = $file['url']; + $type = $file['type']; + $file = addslashes( $file['file'] ); + $filename = basename( $file ); + + // Construct the object array + $object = array( 'post_title' => $filename, + 'post_content' => $url, + 'post_mime_type' => $type, + 'guid' => $url + ); + + // Save the data + $id = wp_insert_attachment( $object, $file ); + + return array( 'file' => $file, 'id' => $id ); +} + +?>