Ticket #5686: xmlrpc.php.diff
File xmlrpc.php.diff, 1.8 KB (added by , 17 years ago) |
---|
-
xmlrpc.php
69 69 if ( isset($HTTP_RAW_POST_DATA) ) 70 70 logIO("I", $HTTP_RAW_POST_DATA); 71 71 72 do_action( 'xmlrpc_user_agent' ); 72 73 73 74 class wp_xmlrpc_server extends IXR_Server { 74 75 … … 663 664 664 665 set_current_user(0, $username); 665 666 if( !current_user_can( 'edit_posts' ) ) 666 return new IXR_Error( 401, __( 'Sorry, you must be able to publishto this blog in order to view categories.' ) );667 return new IXR_Error( 401, __( 'Sorry, you must be able to edit posts to this blog in order to view categories.' ) ); 667 668 668 669 do_action('xmlrpc_call', 'wp.suggestCategories'); 669 670 … … 696 697 return new IXR_Error( 403, __( 'You are not allowed details about comments.' ) ); 697 698 } 698 699 700 do_action('xmlrpc_call', 'wp.getCommentCount'); 701 699 702 return get_comment_count( $post_id ); 700 703 } 701 704 … … 716 719 return new IXR_Error( 403, __( 'You are not allowed access to details about this blog.' ) ); 717 720 } 718 721 722 do_action('xmlrpc_call', 'wp.getPostStatusList'); 723 719 724 return get_post_statuses( ); 720 725 } 721 726 … … 736 741 return new IXR_Error( 403, __( 'You are not allowed acces to details about this blog.' ) ); 737 742 } 738 743 744 do_action('xmlrpc_call', 'wp.getPageStatusList'); 745 739 746 return get_page_statuses( ); 740 747 } 741 748 … … 1896 1903 return $this->error; 1897 1904 } 1898 1905 1906 do_action('xmlrpc_call', 'mt.getRecentPostTitles'); 1907 1899 1908 $posts_list = wp_get_recent_posts($num_posts); 1900 1909 1901 1910 if (!$posts_list) { … … 2048 2057 /* mt.supportedTextFilters ...returns an empty array because we don't 2049 2058 support per-post text filters yet */ 2050 2059 function mt_supportedTextFilters($args) { 2060 do_action('xmlrpc_call', 'mt.supportedTextFilters'); 2051 2061 return apply_filters('xmlrpc_text_filters', array()); 2052 2062 } 2053 2063