[wpmu-trac] [WordPress MU Trac] #307: xmlrpc problem when blogger.getUsersBlogs

WordPress MU Trac wpmu-trac at lists.automattic.com
Sat Apr 14 18:30:29 GMT 2007


#307: xmlrpc problem when blogger.getUsersBlogs
------------------------+---------------------------------------------------
 Reporter:  miyauchi    |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  WPMU 1.0
Component:  component1  |     Version:  1.0     
 Severity:  normal      |    Keywords:          
------------------------+---------------------------------------------------
 when blogger.getUsersBlogs,
 response XML is netsted like
 {{{
 <array><data><value><array><data><value>
 }}}
 Therefore, it don't work.

 I modify it as follows.[[BR]]
 xmlrpc.php line 581 to 596
 {{{
 $req_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
 foreach ( $blogs as $blog ) {
         $rpc_url = get_option('home') . '/xmlrpc.php';
         if( $rpc_url == $req_url ){
                 $blog_id = $blog->userblog_id;
                 switch_to_blog($blog_id);
                 $is_admin = current_user_can('level_8');
                 $struct = array(
                         'isAdmin'  => $is_admin,
                         'url'      => get_option('home') . '/',
                         'blogid'   => $blog_id,
                         'blogName' => get_option('blogname')
                 );
                 break;
         }
 }
 if($struct){
         return array($struct);
 }else{
         return $this->error;
 }
 }}}
 It works without trouble in SSL off.[[BR]]
 thanks.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/307>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list