diff --git a/wp-admin/import/mt.php b/wp-admin/import/mt.php index ba0ab47642..db2bbb0e71 100644 --- a/wp-admin/import/mt.php +++ b/wp-admin/import/mt.php @@ -1,10 +1,5 @@

The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn't finish. If you get an out of memory error try splitting up the import file into pieces.

footer(); } @@ -67,7 +60,6 @@ class MT_Import { $user_id = wp_create_user($author, $pass); $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. } else { - $wpdb->query("INSERT INTO $wpdb->users (user_level, user_login, user_pass, user_nickname) VALUES ('1', '{$this->newauthornames[$this->j]}', '$md5pass', '{$this->newauthornames[$this->j]}')"); //if not left_blank, insert the user specified name $user_id = wp_create_user($this->newauthornames[$this->j], $pass); } } else { @@ -177,7 +169,6 @@ class MT_Import { $this->get_entries(); $this->mt_authors_form(); - wp_import_cleanup($this->id); } function process_posts() { @@ -381,10 +372,15 @@ class MT_Import { } echo ''; + + wp_import_cleanup($this->id); + echo '

'.sprintf(__('All done. Have fun!'), get_option('home')).'

'; } function import() { + $this->id = (int) $_GET['id']; + $this->file = get_attached_file($this->id); $this->get_authors_from_post(); $this->get_entries(); $this->process_posts(); @@ -404,7 +400,7 @@ class MT_Import { $this->select_authors(); break; case 2: - echo "ID: {$_GET['id']}
"; + $this->import(); break; } }