Ticket #3971: 3971.diff
File 3971.diff, 1.7 KB (added by , 18 years ago) |
---|
-
wp-admin/import/blogger.php
84 84 if ( empty($this->blogs) ) { 85 85 $headers = array( 86 86 "GET /feeds/default/blogs HTTP/1.0", 87 "Host: www .blogger.com",87 "Host: www2.blogger.com", 88 88 "Authorization: AuthSub token=\"$this->token\"" 89 89 ); 90 90 $request = join( "\r\n", $headers ) . "\r\n\r\n"; … … 547 547 } 548 548 549 549 $comment_post_ID = $this->blogs[$importing_blog]['posts'][$entry->old_post_permalink]; 550 $comment_author = addslashes( $this->no_apos( strip_tags( $entry->author ) ) ); 550 preg_match('#<name>(.+?)</name>.*(?:\<uri>(.+?)</uri>)?#', $entry->author, $matches); 551 $comment_author = addslashes( $this->no_apos( strip_tags( (string) $matches[1] ) ) ); 552 $comment_author_url = addslashes( $this->no_apos( strip_tags( (string) $matches[2] ) ) ); 551 553 $comment_date = $this->convert_date( $entry->updated ); 552 554 $comment_content = addslashes( $this->no_apos( html_entity_decode( $entry->content ) ) ); 553 555 … … 563 565 ) { 564 566 ++$this->blogs[$importing_blog]['comments_skipped']; 565 567 } else { 566 $comment = compact('comment_post_ID', 'comment_author', 'comment_ date', 'comment_content');568 $comment = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_date', 'comment_content'); 567 569 568 570 $comment_id = wp_insert_comment($comment); 569 571 … … 672 674 return $sock; 673 675 } 674 676 675 function _get_blogger_sock($host = 'www .blogger.com') {677 function _get_blogger_sock($host = 'www2.blogger.com') { 676 678 if ( !$sock = @ fsockopen($host, 80, $errno, $errstr) ) { 677 679 $this->uh_oh( 678 680 sprintf( __('Could not connect to %s'), $host ),