Index: mt.php
===================================================================
--- mt.php	(revision 6295)
+++ mt.php	(working copy)
@@ -23,8 +23,10 @@
 ?>
 <div class="narrow">
 <p><?php _e('Howdy! We&#8217;re about to begin importing all of your Movable Type or Typepad entries into WordPress. To begin, either choose a file to upload and click "Upload file and import," or use FTP to upload your MT export file as <code>mt-export.txt</code> in your <code>/wp-content/</code> directory and then click "Import mt-export.txt"'); ?></p>
+
 <?php wp_import_upload_form( add_query_arg('step', 1) ); ?>
 <form method="post" action="<?php echo add_query_arg('step', 1); ?>" class="import-upload-form">
+
 <?php wp_nonce_field('import-upload'); ?>
 <p>
 	<input type="hidden" name="upload_type" value="ftp" />
@@ -196,7 +198,7 @@
 		$this->mt_authors_form();
 	}
 
-	function save_post(&$post, &$comments, &$pings) {
+	function save_post(&$post, &$comments, &$pings, &$keywords) {
 		// Reset the counter
 		set_time_limit(30);
 		$post = get_object_vars($post);
@@ -222,6 +224,14 @@
 			if ( 0 != count($post->categories) ) {
 				wp_create_categories($post->categories, $post_id);
 			}
+			
+		 // Add tags or keywords
+ 			if ( 1 < strlen($post->post_keywords) ) {
+ 			  // Keywords exist. 
+  		 	printf(__('<br />Adding tags <i>%s</i>...'), stripslashes($post->post_keywords));
+  		 	wp_add_post_tags($post_id, $post->post_keywords);
+  		 }
+		 
 		}
 
 		$num_comments = 0;
@@ -274,7 +284,10 @@
 		$comments = array();
 		$ping = new StdClass();
 		$pings = array();
+		$keyword = new StdClass();
+		$keywords = array();
 
+
 		echo "<div class='wrap'><ol>";
 
 		while ( $line = fgets($handle) ) {
@@ -293,12 +306,13 @@
 			} else if ( '--------' == $line ) {
 				// Finishing a post.
 				$context = '';
-				$result = $this->save_post($post, $comments, $pings);
+				$result = $this->save_post($post, $comments, $pings, $keywords);
 				if ( is_wp_error( $result ) ) 
 					return $result;
 				$post = new StdClass;
 				$comment = new StdClass();
 				$ping = new StdClass();
+				$keywords = new StdClass();				
 				$comments = array();
 				$pings = array();
 			} else if ( 'BODY:' == $line ) {
@@ -396,6 +410,8 @@
 					$post->extended .= $line;
 				} else if ( 'excerpt' == $context ) {
 					$post->post_excerpt .= $line;
+				} else if ( 'keywords' == $context ) {
+					$post->post_keywords .= $line;					
 				} else if ( 'comment' == $context ) {
 					$comment->comment_content .= $line;
 				} else if ( 'ping' == $context ) {

