X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/includes/class-wp-importer.php diff --git a/wp-admin/includes/class-wp-importer.php b/wp-admin/includes/class-wp-importer.php index 5a7f0e47..b017c84f 100644 --- a/wp-admin/includes/class-wp-importer.php +++ b/wp-admin/includes/class-wp-importer.php @@ -10,10 +10,6 @@ class WP_Importer { */ function __construct() {} - function WP_Importer() { - $this->__construct(); - } - /** * Returns array with imported permalinks from WordPress database * @@ -130,14 +126,12 @@ class WP_Importer { } if ( empty( $parsed['path'] ) ) $parsed['path'] = '/'; - if ( !$blog = get_blog_info( $parsed['host'], $parsed['path'] ) ) { + $blog = get_blog_details( array( 'domain' => $parsed['host'], 'path' => $parsed['path'] ) ); + if ( !$blog ) { fwrite( STDERR, "Error: Could not find blog\n" ); exit(); } $blog_id = (int) $blog->blog_id; - // Restore global $current_blog - global $current_blog; - $current_blog = $blog; } if ( function_exists( 'is_multisite' ) ) { @@ -196,7 +190,7 @@ class WP_Importer { $args['headers'] = $headers; - return wp_remote_request( $url, $args ); + return wp_safe_remote_request( $url, $args ); } /** @@ -215,8 +209,6 @@ class WP_Importer { * @return bool */ function is_user_over_quota() { - global $current_user, $current_blog; - if ( function_exists( 'upload_is_user_over_quota' ) ) { if ( upload_is_user_over_quota( 1 ) ) { echo "Sorry, you have used your upload quota.\n";