Changeset 16256
- Timestamp:
- 11/09/2010 10:16:23 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r16149 r16256 1763 1763 $this->escape($args); 1764 1764 1765 // $args[0] = appkey - ignored 1765 1766 $blog_ID = (int) $args[1]; /* though we don't use it yet */ 1766 1767 $username = $args[2]; 1767 1768 $password = $args[3]; 1768 $num_posts = $args[4]; 1769 if ( isset( $args[4] ) ) 1770 $query = array( 'numberposts' => absint( $args[4] ) ); 1771 else 1772 $query = array(); 1769 1773 1770 1774 if ( !$user = $this->login($username, $password) ) … … 1773 1777 do_action('xmlrpc_call', 'blogger.getRecentPosts'); 1774 1778 1775 $posts_list = wp_get_recent_posts( $num_posts);1779 $posts_list = wp_get_recent_posts( $query ); 1776 1780 1777 1781 if ( !$posts_list ) { … … 2683 2687 $username = $args[1]; 2684 2688 $password = $args[2]; 2685 $num_posts = (int) $args[3]; 2689 if ( isset( $args[3] ) ) 2690 $query = array( 'numberposts' => absint( $args[3] ) ); 2691 else 2692 $query = array(); 2686 2693 2687 2694 if ( !$user = $this->login($username, $password) ) … … 2690 2697 do_action('xmlrpc_call', 'metaWeblog.getRecentPosts'); 2691 2698 2692 $posts_list = wp_get_recent_posts( $num_posts);2699 $posts_list = wp_get_recent_posts( $query ); 2693 2700 2694 2701 if ( !$posts_list ) … … 2915 2922 $username = $args[1]; 2916 2923 $password = $args[2]; 2917 $num_posts = (int) $args[3]; 2924 if ( isset( $args[3] ) ) 2925 $query = array( 'numberposts' => absint( $args[3] ) ); 2926 else 2927 $query = array(); 2918 2928 2919 2929 if ( !$user = $this->login($username, $password) ) … … 2922 2932 do_action('xmlrpc_call', 'mt.getRecentPostTitles'); 2923 2933 2924 $posts_list = wp_get_recent_posts( $num_posts);2934 $posts_list = wp_get_recent_posts( $query ); 2925 2935 2926 2936 if ( !$posts_list ) {
Note: See TracChangeset
for help on using the changeset viewer.