Ticket #22320: GetRecentPostPrivilegesFix.patch
File GetRecentPostPrivilegesFix.patch, 913 bytes (added by , 12 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
3787 3787 if ( !$user = $this->login($username, $password) ) 3788 3788 return $this->error; 3789 3789 3790 if ( !current_user_can( 'edit_posts' ) ) 3791 return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) ); 3792 3790 3793 do_action('xmlrpc_call', 'blogger.getRecentPosts'); 3791 3794 3792 3795 $posts_list = wp_get_recent_posts( $query ); … … 4817 4820 if ( !$user = $this->login($username, $password) ) 4818 4821 return $this->error; 4819 4822 4823 if ( !current_user_can( 'edit_posts' ) ) 4824 return new IXR_Error( 401, __( 'Sorry, you cannot edit posts on this site.' ) ); 4825 4820 4826 do_action('xmlrpc_call', 'metaWeblog.getRecentPosts'); 4821 4827 4822 4828 $posts_list = wp_get_recent_posts( $query );