Changeset 12852 for trunk/xmlrpc.php
- Timestamp:
- 01/26/2010 08:15:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r12752 r12852 453 453 $password = $args[1]; 454 454 455 if ( !$user = $this->login($username, $password) ) {456 return $this->error; 457 } 455 if ( !$user = $this->login($username, $password) ) 456 return $this->error; 457 458 458 459 459 do_action( 'xmlrpc_call', 'wp.getUsersBlogs' ); … … 1547 1547 */ 1548 1548 function blogger_getUsersBlogs($args) { 1549 if ( is_multisite() ) 1550 return _multisite_getUsersBlogs($args); 1549 1551 1550 1552 $this->escape($args); … … 1569 1571 1570 1572 return array($struct); 1573 } 1574 1575 /** 1576 * Private function for retrieving a users blogs for multisite setups 1577 * 1578 * @access protected 1579 */ 1580 function _multisite_getUsersBlogs($args) { 1581 global $current_blog; 1582 $domain = $current_blog->domain; 1583 $path = $current_blog->path . 'xmlrpc.php'; 1584 $protocol = is_ssl() ? 'https' : 'http'; 1585 1586 $rpc = new IXR_Client("$protocol://{$domain}{$path}"); 1587 $rpc->query('wp.getUsersBlogs', $args[1], $args[2]); 1588 $blogs = $rpc->getResponse(); 1589 1590 if ( isset($blogs['faultCode']) ) 1591 return new IXR_Error($blogs['faultCode'], $blogs['faultString']); 1592 1593 if ( $_SERVER['HTTP_HOST'] == $domain && $_SERVER['REQUEST_URI'] == $path ) { 1594 return $blogs; 1595 } else { 1596 foreach ( (array) $blogs as $blog ) { 1597 if ( strpos($blog['url'], $_SERVER['HTTP_HOST']) ) 1598 return array($blog); 1599 } 1600 return array(); 1601 } 1571 1602 } 1572 1603 … … 2107 2138 if ( $post_more ) 2108 2139 $post_content = $post_content . "<!--more-->" . $post_more; 2109 2140 2110 2141 $to_ping = $content_struct['mt_tb_ping_urls']; 2111 2142 if ( is_array($to_ping) )
Note: See TracChangeset
for help on using the changeset viewer.