mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 03:30:06 +00:00
XML-RPC: Avoid loopback request in blogger.getUsersBlogs.
The `blogger.getUsersBlogs` endpoint does not currently work on Multisite environments which require HTTPS. This changes `wp_xmlrpc_server::_multisite_getUsersBlogs()` to call the method directly instead of relying on a new `IXR_Client` request, which only supports HTTP. Props dd32. Fixes #56492. git-svn-id: https://develop.svn.wordpress.org/trunk@54468 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4859,12 +4859,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$domain = $current_blog->domain;
|
||||
$path = $current_blog->path . 'xmlrpc.php';
|
||||
|
||||
$rpc = new IXR_Client( set_url_scheme( "http://{$domain}{$path}" ) );
|
||||
$rpc->query( 'wp.getUsersBlogs', $args[1], $args[2] );
|
||||
$blogs = $rpc->getResponse();
|
||||
|
||||
if ( isset( $blogs['faultCode'] ) ) {
|
||||
return new IXR_Error( $blogs['faultCode'], $blogs['faultString'] );
|
||||
$blogs = $this->wp_getUsersBlogs( $args );
|
||||
if ( $blogs instanceof IXR_Error ) {
|
||||
return $blogs;
|
||||
}
|
||||
|
||||
if ( $_SERVER['HTTP_HOST'] == $domain && $_SERVER['REQUEST_URI'] == $path ) {
|
||||
|
||||
Reference in New Issue
Block a user