Changeset 3517 for trunk/wp-admin/import/blogger.php
- Timestamp:
- 02/12/2006 07:53:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/blogger.php
r3397 r3517 136 136 if ($header) curl_setopt($ch, CURLOPT_HTTPHEADER, $header); 137 137 $response = curl_exec ($ch); 138 138 139 139 if ($parse) { 140 140 $response = $this->parse_response($response); … … 142 142 return $response; 143 143 } 144 144 145 145 return $response; 146 146 } … … 211 211 update_option('import-blogger', $this->import); 212 212 } 213 213 214 214 // Redirects to next step 215 215 function do_next_step() { … … 225 225 $this->login_form(__('The script will log into your Blogger account, change some settings so it can read your blog, and restore the original settings when it\'s done. Here\'s what you do:').'</p><ol><li>'.__('Back up your Blogger template.').'</li><li>'.__('Back up any other Blogger settings you might need later.').'</li><li>'.__('Log out of Blogger').'</li><li>'.__('Log in <em>here</em> with your Blogger username and password.').'</li><li>'.__('On the next screen, click one of your Blogger blogs.').'</li><li>'.__('Do not close this window or navigate away until the process is complete.').'</li></ol>'); 226 226 } 227 228 // Try logging in. If we get an array of cookies back, we at least connected. 227 228 // Try logging in. If we get an array of cookies back, we at least connected. 229 229 $this->import['cookies'] = $this->login_blogger($_POST['user'], $_POST['pass']); 230 230 if ( !is_array( $this->import['cookies'] ) ) { 231 231 $this->login_form(__('Login failed. Please enter your credentials again.')); 232 232 } 233 233 234 234 // Save the password so we can log the browser in when it's time to publish. 235 235 $this->import['pass'] = $_POST['pass']; … … 396 396 $archive = $this->get_blogger($url); 397 397 if ( $archive['code'] > 200 ) 398 continue; 398 continue; 399 399 $posts = explode('<wordpresspost>', $archive['body']); 400 400 for ($i = 1; $i < count($posts); $i = $i + 1) { … … 410 410 $post_author_name = $wpdb->escape(trim($postinfo[1])); 411 411 $post_author_email = $postinfo[5] ? $postinfo[5] : 'user@wordpress.org'; 412 412 413 413 if ( $this->lump_authors ) { 414 414 // Ignore Blogger authors. Use the current user_ID for all posts imported. … … 436 436 $postminute = zeroise($post_date_His[1], 2); 437 437 $postsecond = zeroise($post_date_His[2], 2); 438 438 439 439 if (($post_date[2] == 'PM') && ($posthour != '12')) 440 440 $posthour = $posthour + 12; 441 441 else if (($post_date[2] == 'AM') && ($posthour == '12')) 442 442 $posthour = '00'; 443 443 444 444 $post_date = "$postyear-$postmonth-$postday $posthour:$postminute:$postsecond"; 445 445 446 446 $post_content = addslashes($post_content); 447 447 $post_content = str_replace(array('<br>','<BR>','<br/>','<BR/>','<br />','<BR />'), "\n", $post_content); // the XHTML touch... ;) 448 448 449 449 $post_title = addslashes($post_title); 450 450 451 451 $post_status = 'publish'; 452 452 453 453 if ( $ID = post_exists($post_title, '', $post_date) ) { 454 454 $post_array[$i]['ID'] = $ID; … … 598 598 $this->restart(); 599 599 } 600 600 601 601 if ( isset($_GET['noheader']) ) { 602 602 $this->import = get_settings('import-blogger'); … … 648 648 } 649 649 die; 650 650 651 651 } else { 652 652 $this->greet();
Note: See TracChangeset
for help on using the changeset viewer.