X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7688c6ba71852cd89123b62b2d57683535e4702a..refs/tags/wordpress-2.6.2:/wp-admin/import/blogger.php diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php index b518cd73..140d8f2b 100644 --- a/wp-admin/import/blogger.php +++ b/wp-admin/import/blogger.php @@ -12,7 +12,7 @@ class Blogger_Import { $auth_url = "https://www.google.com/accounts/AuthSubRequest"; $title = __('Import Blogger'); $welcome = __('Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog.'); - $prereqs = __('To use this importer, you must have a Google account, an upgraded (New, was Beta) blog, and it must be on blogspot or a custom domain (not FTP).'); + $prereqs = __('To use this importer, you must have a Google account and an upgraded (New, was Beta) blog hosted on blogspot.com or a custom domain (not FTP).'); $stepone = __('The first thing you need to do is tell Blogger to let WordPress access your account. You will be sent back here after providing authorization.'); $auth = __('Authorize'); @@ -20,7 +20,7 @@ class Blogger_Import {

$title

$welcome

$prereqs

$stepone

- + @@ -178,7 +178,7 @@ class Blogger_Import { $init .= "blogs[$i]=new blog($i,'$blogtitle','{$blog['mode']}'," . $this->get_js_status($i) . ');'; $pstat = "

 
$pdone/{$blog['total_posts']}
"; $cstat = "
 
$cdone/{$blog['total_comments']}
"; - $rows .= "$blogtitle{$blog['host']}$pstat$cstat\n"; + $rows .= "$blogtitle{$blog['host']}$pstat$cstat\n"; } echo "

$title

\n$rows
$name$url$posts$comments$action
"; @@ -381,7 +381,7 @@ class Blogger_Import { $AtomParser = new AtomParser(); $AtomParser->parse( $entry ); $result = $this->import_post($AtomParser->entry); - if ( is_wp_error( $result ) ) + if ( is_wp_error( $result ) ) return $result; unset($AtomParser); } @@ -520,7 +520,7 @@ class Blogger_Import { $post = compact('post_date', 'post_content', 'post_title', 'post_status'); $post_id = wp_insert_post($post); - if ( is_wp_error( $post_id ) ) + if ( is_wp_error( $post_id ) ) return $post_id; wp_create_categories( array_map( 'addslashes', $entry->categories ), $post_id ); @@ -613,12 +613,12 @@ class Blogger_Import { $blogtitle = "{$blog['title']} ({$blog['host']})"; $mapthis = __('Blogger username'); $tothis = __('WordPress login'); - $submit = js_escape( __('Save Changes »') ); + $submit = js_escape( __('Save Changes') ); foreach ( $blog['authors'] as $i => $author ) $rows .= ""; - return "

$heading

$blogtitle

$directions

$rows
$mapthis$tothis
"; + return "

$heading

$blogtitle

$directions

$rows
$mapthis$tothis
"; } function get_user_options($current) { @@ -641,7 +641,7 @@ class Blogger_Import { $host = $this->blogs[$importing_blog]['host']; // Get an array of posts => authors - $post_ids = (array) $wpdb->get_col("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_blog' AND meta_value = '$host'"); + $post_ids = (array) $wpdb->get_col( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'blogger_blog' AND meta_value = %s", $host) ); $post_ids = join( ',', $post_ids ); $results = (array) $wpdb->get_results("SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = 'blogger_author' AND post_id IN ($post_ids)"); foreach ( $results as $row ) @@ -658,7 +658,7 @@ class Blogger_Import { $post_ids = (array) array_keys( $authors_posts, $this->blogs[$importing_blog]['authors'][$author][0] ); $post_ids = join( ',', $post_ids); - $wpdb->query("UPDATE $wpdb->posts SET post_author = $user_id WHERE id IN ($post_ids)"); + $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE id IN ($post_ids)", $user_id) ); $this->blogs[$importing_blog]['authors'][$author][1] = $user_id; } $this->save_vars(); @@ -770,7 +770,7 @@ class Blogger_Import { $this->$key = $value; if ( isset( $_REQUEST['blog'] ) ) { - $blog = is_array($_REQUEST['blog']) ? array_shift( array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog']; + $blog = is_array($_REQUEST['blog']) ? array_shift( $keys = array_keys( $_REQUEST['blog'] ) ) : $_REQUEST['blog']; $blog = (int) $blog; $result = $this->import_blog( $blog ); if ( is_wp_error( $result ) ) @@ -788,7 +788,7 @@ class Blogger_Import { $restart = __('Restart'); $message = __('We have saved some information about your Blogger account in your WordPress database. Clearing this information will allow you to start over. Restarting will not affect any posts you have already imported. If you attempt to re-import a blog, duplicate posts and comments will be skipped.'); $submit = __('Clear account information'); - echo "

$restart

$message

"; + echo "

$restart

$message

"; } } @@ -821,9 +821,6 @@ thead td { font-weight: bold; } position: relative; text-align: center; } -.submit { - text-align: center !important; -}