WordPress.org

Make WordPress Core

Changeset 5038


Ignore:
Timestamp:
03/14/07 19:20:19 (7 years ago)
Author:
ryan
Message:

Blogger importer updates. fixes #3971

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/blogger.php

    r4990 r5038  
    8585            $headers = array( 
    8686                "GET /feeds/default/blogs HTTP/1.0", 
    87                 "Host: www.blogger.com", 
     87                "Host: www2.blogger.com", 
    8888                "Authorization: AuthSub token=\"$this->token\"" 
    8989            ); 
     
    548548 
    549549        $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] ) ) ); 
    551553        $comment_date    = $this->convert_date( $entry->updated ); 
    552554        $comment_content = addslashes( $this->no_apos( html_entity_decode( $entry->content ) ) ); 
     
    564566            ++$this->blogs[$importing_blog]['comments_skipped']; 
    565567        } 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'); 
    567569 
    568570            $comment_id = wp_insert_comment($comment); 
     
    673675    } 
    674676 
    675     function _get_blogger_sock($host = 'www.blogger.com') { 
     677    function _get_blogger_sock($host = 'www2.blogger.com') { 
    676678        if ( !$sock = @ fsockopen($host, 80, $errno, $errstr) ) { 
    677679            $this->uh_oh( 
Note: See TracChangeset for help on using the changeset viewer.