Ticket #22422: tumblr.patch
| File tumblr.patch, 1.3 KB (added by , 13 years ago) |
|---|
-
tumblr-importer.php
339 339 $done = true; 340 340 341 341 $this->error=null; 342 343 342 if ( !empty( $this->blog[$url]['progress'] ) ) { 344 343 $done = false; 345 344 do { … … 456 455 if ($this->blog[$url]['posts_complete'] + TUMBLR_MAX_IMPORT > $total) $count = $total - $start; 457 456 else $count = TUMBLR_MAX_IMPORT; 458 457 458 add_filter( 'tumblr_post_type', function() { return 'draft'; } ); 459 459 $imported_posts = $this->fetch_posts($url, $start, $count, $this->email, $this->password, 'draft' ); 460 460 461 461 if ( empty($imported_posts) ) { … … 748 748 $url = parse_url( $url, PHP_URL_HOST ); 749 749 $post_type = apply_filters( 'tumblr_post_type', '' ); 750 750 $url = trailingslashit( "http://api.tumblr.com/v2/blog/$url/posts/$post_type" ); 751 751 752 752 do_action( 'tumblr_importer_pre_fetch_posts' ); 753 753 754 754 $params = array( … … 979 979 if ( empty( $this->access_tokens ) ) 980 980 return false; 981 981 982 $params = array('oauth_consumer_key' => $this-> consumerkey,982 $params = array('oauth_consumer_key' => $this->get_consumer_key(), 983 983 "oauth_nonce" => time(), 984 984 "oauth_timestamp" => time(), 985 985 "oauth_token" => $this->access_tokens['oauth_token'],