diff -r rmw-wordpress-importer-0.6.2/languages/wordpress-importer.pot wordpress-importer/languages/wordpress-importer.pot
5c5
< "Project-Id-Version: WordPress Importer 0.6\n"
---
> "Project-Id-Version: WordPress Importer 0.5\n"
diff -r rmw-wordpress-importer-0.6.2/wordpress-importer.php wordpress-importer/wordpress-importer.php
841,845c841
< 		// Note that we don't do this in the case that the original upload didn't
< 		// have a valid extension, but we were able to determine one by looking at
< 		// the relevant HTTP headers (as denoted by the
< 		// 'force_extension_in_replacement' flag)
< 		if ( preg_match( '!^image/!', $info['type'] ) && empty($upload['force_extension_in_replacement'])) {
---
> 		if ( preg_match( '!^image/!', $info['type'] ) ) {
866d861
< 
870,889d864
< 		// Some systems, like moveable-type / typepad, advertise files w/o
< 		// extension information attached.	We can get around this limitation
< 		// by grabbing information about the file from the webserver
< 		$file_type = wp_check_filetype($file_name);
< 
< 		// If there is a situation where we're adding a file extension
< 		// onto an upload that didn't originally have one, we
< 		// can tell the remapper to not strip off the extension/
< 		$force_extension_in_replacement = FALSE;
< 
< 		if ( empty( $file_type['ext'] ) ) {
< 
< 			$retured_file_info = $this->fetch_attachment_info_from_server( $url );
< 
< 			if ( $retured_file_info ) {
< 				$file_name = $retured_file_info['filename'];
< 				$force_extension_in_replacement = TRUE;
< 			}
< 		}
< 
935,936d909
< 		if ($force_extension_in_replacement)
< 			$upload['force_extension_in_replacement'] = TRUE;
1111,1165d1083
< 
< 	/**
< 	 * Attempts to grab information about a file from a URL.  This
< 	 * call just requests the header information from the server (the
< 	 * body of the resource isn't fetched) so the call is relativly lite.
< 	 *
< 	 * @param string $url
< 	 *   A valid url to request mime info from
< 	 *
< 	 * @return array|bool
< 	 *   If the server didn't return a valid header, FALSE is returned.  Otherwise,
< 	 *   an array with the following keys is returned:
< 	 *     'ext' (string):  The extension of the file, if avaiable
< 	 *     'type' (string): The advertised mime type of the resource, if available
< 	 *     'filename' (string):
< 	 *                      The suggested name of the file, if available
< 	 */
< 	function fetch_attachment_info_from_server($url) {
< 
< 		$results = array(
< 			'ext' => '',
< 			'type' => '',
< 			'filename' => '',
< 		);
< 
< 		$curl = curl_init();
< 		curl_setopt( $curl, CURLOPT_URL, $url );
< 		curl_setopt( $curl, CURLOPT_HEADER, TRUE );
< 		curl_setopt( $curl, CURLOPT_NOBODY, TRUE );
< 		curl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE );
< 		$header_info = curl_exec( $curl );
< 		curl_close( $curl );
< 
< 		if ( ! $header_info) {
< 			return FALSE;
< 		}
< 
< 		$file_type_pattern = '/Content-Type:\s?([^\s]+)/i';
< 		$file_type_matches = array();
< 		if ( preg_match( $file_type_pattern, $header_info, $file_type_matches ) ) {
< 			$results['type'] = trim( $file_type_matches[1] );
< 		}
< 
< 		$file_name_pattern = '/filename=([^\s]+)/i';
< 		$file_name_matches = array();
< 		if ( preg_match( $file_name_pattern, $header_info, $file_name_matches ) ) {
< 			$results['filename'] = trim( $file_name_matches[1] );
< 
< 			if ( ( $index = strripos( $results['filename'], '.' ) ) !== FALSE ) {
< 				$results['ext'] = substr( $results['filename'], $index + 1 );
< 			}
< 		}
< 
< 		return $results;
< 	}
