From 0b2c8e19dfa5337ca29add693670ea5ef915a674 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 23 Nov 2005 10:02:23 +0000 Subject: [PATCH] MT importer work. git-svn-id: https://develop.svn.wordpress.org/trunk@3204 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/import/mt.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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; } }