Changeset 3985 for trunk/wp-admin/import/blogger.php
- Timestamp:
- 07/05/2006 10:00:03 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/blogger.php
r3928 r3985 242 242 preg_match_all('#posts\.g\?blogID=(\d+)">([^<]+)</a>#U', $response['body'], $blogsary); 243 243 if ( ! count( $blogsary[1] < 1 ) ) 244 die(__('No blogs found for this user.'));244 wp_die(__('No blogs found for this user.')); 245 245 $this->import['blogs'] = array(); 246 246 $template = '<MainPage><br /><br /><br /><p>'.__('Are you looking for %title%? It is temporarily out of service. Please try again in a few minutes. Meanwhile, discover <a href="http://wordpress.org/">a better blogging tool</a>.').'</p><BloggerArchives><a class="archive" href="<$BlogArchiveURL$>"><$BlogArchiveName$></a><br /></BloggerArchives></MainPage><ArchivePage><Blogger><wordpresspost><$BlogItemDateTime$>|W|P|<$BlogItemAuthorNickname$>|W|P|<$BlogItemBody$>|W|P|<$BlogItemNumber$>|W|P|<$BlogItemTitle$>|W|P|<$BlogItemAuthorEmail$><BlogItemCommentsEnabled><BlogItemComments><wordpresscomment><$BlogCommentDateTime$>|W|P|<$BlogCommentAuthor$>|W|P|<$BlogCommentBody$></BlogItemComments></BlogItemCommentsEnabled></Blogger></ArchivePage>'; … … 307 307 $response = $this->get_blogger("http://www.blogger.com/blog-publishing.g?blogID={$_GET['blog']}&publishMode=0", $headers); 308 308 if ( $response['code'] >= 400 ) 309 die('<h2>'.__('Failed attempt to change publish mode from FTP to BlogSpot.').'</h2><pre>' . addslashes(print_r($headers, 1)) . addslashes(print_r($response, 1)) . '</pre>');309 wp_die('<h2>'.__('Failed attempt to change publish mode from FTP to BlogSpot.').'</h2><pre>' . addslashes(print_r($headers, 1)) . addslashes(print_r($response, 1)) . '</pre>'); 310 310 $this->import['blogs'][$_GET['blog']]['url'] = 'http://' . $optary['modify']['subdomain'] . '.blogspot.com/'; 311 311 sleep(2); … … 322 322 $response = $this->post_blogger($posturl, $headers, $paramary); 323 323 if ( $response['code'] >= 400 || strstr($response['body'], 'There are errors on this form') ) 324 die('<p>'.__('Error on form submission. Retry or reset the importer.').'</p>' . addslashes(print_r($response, 1)));324 wp_die('<p>'.__('Error on form submission. Retry or reset the importer.').'</p>' . addslashes(print_r($response, 1))); 325 325 } 326 326 $output .= "<del><p>$blog_opt</p></del>\n"; … … 365 365 $bloghtml = $this->get_blogger($this->import['blogs'][$_GET['blog']]['url']); 366 366 if (! strstr($bloghtml['body'], '<a class="archive"') ) 367 die(__('Your Blogger blog did not take the new template or did not respond.'));367 wp_die(__('Your Blogger blog did not take the new template or did not respond.')); 368 368 preg_match_all('#<a class="archive" href="([^"]*)"#', $bloghtml['body'], $archives); 369 369 foreach ($archives[1] as $archive) { … … 547 547 sleep(2); 548 548 if ( $response['code'] >= 400 ) 549 die('<h1>Error restoring publishMode.</h1><p>Please tell the devs.</p>' . addslashes(print_r($response, 1)) );549 wp_die('<h1>Error restoring publishMode.</h1><p>Please tell the devs.</p>' . addslashes(print_r($response, 1)) ); 550 550 } 551 551 } … … 616 616 } 617 617 //echo "Step $step."; 618 // die('<pre>'.print_r($this->import,1).'</pre');618 //wp_die('<pre>'.print_r($this->import,1).'</pre'); 619 619 switch ($step) { 620 620 case 0 :
Note: See TracChangeset
for help on using the changeset viewer.