From 23148c01f34375c101613fe336cb5ff7cef0fa13 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Jan 2007 03:00:35 +0000 Subject: [PATCH] Revert [4735]. Not needed. git-svn-id: http://svn.automattic.com/wordpress/trunk@4742 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/import/wordpress.php | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 0badf434fd..8cc17b8ee0 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -41,7 +41,7 @@ class WP_Import { function users_form($n) { global $wpdb, $testing; $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID"); -?> $line) { + $newname = trim(stripslashes($line)); + if ($newname == '') + $newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form. + array_push($formnames, "$newname"); + } // $formnames is the array with the form entered names + + foreach ($_POST['userselect'] as $user => $key) { + $selected = trim(stripslashes($key)); + array_push($selectnames, "$selected"); + } + + $count = count($formnames); + for ($i = 0; $i < $count; $i ++) { + if ($selectnames[$i] != '#NONE#') { //if no name was selected from the select menu, use the name entered in the form + array_push($this->newauthornames, "$selectnames[$i]"); + } else { + array_push($this->newauthornames, "$formnames[$i]"); + } + } + } + function wp_authors_form() { ?>

@@ -127,7 +154,7 @@ class WP_Import { foreach ($authors as $author) { ++ $j; echo '
  • '.__('Current author:').' '.$author.'
    '.sprintf(__('Create user %1$s or map to existing'), '
    '); - $this->users_form($author); + $this->users_form($j); echo '
  • '; } @@ -280,6 +307,7 @@ class WP_Import { $this->id = (int) $_GET['id']; $this->file = get_attached_file($this->id); + $this->get_authors_from_post(); $this->get_entries(); $this->process_categories(); $this->process_posts();