Ticket #16316: patch2.diff

File patch2.diff, 1.5 KB (added by maxcutler, 20 months ago)

Extended feedfabrik's patch to include all 3 relevant XML-RPC methods

  • wp-includes/class-wp-xmlrpc-server.php

     
    18661866                $blog_ID    = (int) $args[1]; /* though we don't use it yet */ 
    18671867                $username = $args[2]; 
    18681868                $password  = $args[3]; 
    1869                 if ( isset( $args[4] ) ) 
     1869                if ( isset( $args[4] ) ) { 
    18701870                        $query = array( 'numberposts' => absint( $args[4] ) ); 
    1871                 else 
     1871 
     1872                        if ( isset( $args[5] ) ) 
     1873                                $query['offset'] = absint( $args[5] ); 
     1874                } 
     1875                else { 
    18721876                        $query = array(); 
     1877                } 
    18731878 
    18741879                if ( !$user = $this->login($username, $password) ) 
    18751880                        return $this->error; 
     
    28812886                $blog_ID     = (int) $args[0]; 
    28822887                $username  = $args[1]; 
    28832888                $password   = $args[2]; 
    2884                 if ( isset( $args[3] ) ) 
     2889                if ( isset( $args[3] ) ) { 
    28852890                        $query = array( 'numberposts' => absint( $args[3] ) ); 
    2886                 else 
     2891 
     2892                        if ( isset ($args[4]) ) 
     2893                                $query['offset'] = absint( $args[4] ); 
     2894                } 
     2895                else { 
    28872896                        $query = array(); 
     2897                } 
    28882898 
    28892899                if ( !$user = $this->login($username, $password) ) 
    28902900                        return $this->error; 
     
    31223132                $blog_ID     = (int) $args[0]; 
    31233133                $username  = $args[1]; 
    31243134                $password   = $args[2]; 
    3125                 if ( isset( $args[3] ) ) 
     3135                if ( isset( $args[3] ) ) { 
    31263136                        $query = array( 'numberposts' => absint( $args[3] ) ); 
    3127                 else 
     3137 
     3138                        if ( isset( $args[4] ) ) 
     3139                                $query['offset'] = absint( $args[4] ); 
     3140                } 
     3141                else { 
    31283142                        $query = array(); 
     3143                } 
    31293144 
    31303145                if ( !$user = $this->login($username, $password) ) 
    31313146                        return $this->error;