diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php index 3aa1a50b64..731fe48180 100644 --- a/wp-admin/import/mt.php +++ b/wp-admin/import/mt.php @@ -22,9 +22,18 @@ class MT_Import { $this->header(); ?>
-

+

mt-export.txt in your /wp-content/ directory and then click "Import mt-export.txt"'); ?>

-

out of memory error try splitting up the import file into pieces.'); ?>

+
+ +

+ +mt-export.txt in your /wp-content/ directory'); ?>

+

+ +

+
+

out of memory error try splitting up the import file into pieces.'); ?>

footer(); @@ -138,7 +147,7 @@ class MT_Import { ?>

-

admins entries.'); ?>

+

italics. For each of these names, you can either pick an author in your WordPress installation from the menu, or enter a name for the author in the textbox.'); ?>

mt-export.txt does not exist'); + else + $file['file'] = ABSPATH . '/wp-content/mt-export.txt'; + } else { + $file = wp_import_handle_upload(); + } if ( isset($file['error']) ) { $this->header(); echo '

'.__('Sorry, there has been an error').'.

'; @@ -400,8 +417,10 @@ class MT_Import { function import() { $this->id = (int) $_GET['id']; - - $this->file = get_attached_file($this->id); + if ( $this->id == 0 ) + $this->file = ABSPATH . '/wp-content/mt-export.txt'; + else + $this->file = get_attached_file($this->id); $this->get_authors_from_post(); $this->get_entries(); $this->process_posts();