From d510632e9f07cec9ac3de3b5dafc56bd58c81b8a Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 7 Nov 2006 12:37:04 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@804 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/import/wordpress.php | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'wp-admin/import/wordpress.php') diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 46f5892..b850382 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -54,26 +54,10 @@ class WP_Import { //function to check the authorname and do the mapping function checkauthor($author) { global $wpdb; - //mtnames is an array with the names in the mt import file - $pass = 'changeme'; - if (!(in_array($author, $this->mtnames))) { //a new mt author name is found - ++ $this->j; - $this->mtnames[$this->j] = $author; //add that new mt author name to an array - $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user - if (!$user_id) { //banging my head against the desk now. - if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname - $user_id = wp_create_user($author, $pass); - $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. - } else { - $user_id = wp_create_user($this->newauthornames[$this->j], $pass); - } - } else { - return $user_id; // return pre-existing wp username if it exists - } - } else { - $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array - $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames - } + + $map = $_POST['userselect']; + + $user_id = username_exists($map[$author]); //use that key to get the value of the author's name from $newauthornames return $user_id; } @@ -140,7 +124,6 @@ class WP_Import { ?>

admins entries.'); ?>

-

Current author: '.$author.'
'.'Map to existing: '; - $this->users_form($author); + $this->users_form($j); echo ''; } -- cgit