mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-11 14:22:26 +01:00
Fix a few trailing spaces/tabs
git-svn-id: http://svn.automattic.com/wordpress/trunk@10157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
85038d2678
commit
a32e0dd9ba
wp-admin/import
@ -15,7 +15,7 @@ $title = __('Import Blogroll');
|
|||||||
|
|
||||||
class OPML_Import {
|
class OPML_Import {
|
||||||
|
|
||||||
function dispatch() {
|
function dispatch() {
|
||||||
$step = $_POST['step'];
|
$step = $_POST['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
|
@ -106,7 +106,7 @@ class WP_Import {
|
|||||||
// this doesn't check that the file is perfectly valid but will at least confirm that it's not the wrong format altogether
|
// this doesn't check that the file is perfectly valid but will at least confirm that it's not the wrong format altogether
|
||||||
if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) )
|
if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) )
|
||||||
$is_wxr_file = true;
|
$is_wxr_file = true;
|
||||||
|
|
||||||
if ( false !== strpos($importline, '<wp:base_site_url>') ) {
|
if ( false !== strpos($importline, '<wp:base_site_url>') ) {
|
||||||
preg_match('|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url);
|
preg_match('|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url);
|
||||||
$this->base_url = $url[1];
|
$this->base_url = $url[1];
|
||||||
@ -413,7 +413,7 @@ class WP_Import {
|
|||||||
if ( $post_exists ) {
|
if ( $post_exists ) {
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
printf(__('Post <em>%s</em> already exists.'), stripslashes($post_title));
|
printf(__('Post <em>%s</em> already exists.'), stripslashes($post_title));
|
||||||
$comment_post_ID = $post_id = $post_exists;
|
$comment_post_ID = $post_id = $post_exists;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// If it has parent, process parent first.
|
// If it has parent, process parent first.
|
||||||
@ -558,11 +558,11 @@ class WP_Import {
|
|||||||
function process_attachment($postdata, $remote_url) {
|
function process_attachment($postdata, $remote_url) {
|
||||||
if ($this->fetch_attachments and $remote_url) {
|
if ($this->fetch_attachments and $remote_url) {
|
||||||
printf( __('Importing attachment <em>%s</em>... '), htmlspecialchars($remote_url) );
|
printf( __('Importing attachment <em>%s</em>... '), htmlspecialchars($remote_url) );
|
||||||
|
|
||||||
// If the URL is absolute, but does not contain http, upload it assuming the base_site_url variable
|
// If the URL is absolute, but does not contain http, upload it assuming the base_site_url variable
|
||||||
if ( preg_match('/^\/[\w\W]+$/', $remote_url) )
|
if ( preg_match('/^\/[\w\W]+$/', $remote_url) )
|
||||||
$remote_url = rtrim($this->base_url,'/').$remote_url;
|
$remote_url = rtrim($this->base_url,'/').$remote_url;
|
||||||
|
|
||||||
$upload = $this->fetch_remote_file($postdata, $remote_url);
|
$upload = $this->fetch_remote_file($postdata, $remote_url);
|
||||||
if ( is_wp_error($upload) ) {
|
if ( is_wp_error($upload) ) {
|
||||||
printf( __('Remote file error: %s'), htmlspecialchars($upload->get_error_message()) );
|
printf( __('Remote file error: %s'), htmlspecialchars($upload->get_error_message()) );
|
||||||
|
Loading…
Reference in New Issue
Block a user