Ticket #5686: xmlrpc.php.diff

File xmlrpc.php.diff, 1.8 KB (added by josephscott, 4 years ago)
  • xmlrpc.php

     
    6969if ( isset($HTTP_RAW_POST_DATA) ) 
    7070  logIO("I", $HTTP_RAW_POST_DATA); 
    7171 
     72do_action( 'xmlrpc_user_agent' ); 
    7273 
    7374class wp_xmlrpc_server extends IXR_Server { 
    7475 
     
    663664 
    664665                set_current_user(0, $username); 
    665666                if( !current_user_can( 'edit_posts' ) )  
    666                         return new IXR_Error( 401, __( 'Sorry, you must be able to publish to 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.' ) ); 
    667668 
    668669                do_action('xmlrpc_call', 'wp.suggestCategories'); 
    669670 
     
    696697                        return new IXR_Error( 403, __( 'You are not allowed details about comments.' ) );   
    697698                }  
    698699 
     700                do_action('xmlrpc_call', 'wp.getCommentCount'); 
     701 
    699702                return get_comment_count( $post_id ); 
    700703        } 
    701704 
     
    716719                        return new IXR_Error( 403, __( 'You are not allowed access to details about this blog.' ) ); 
    717720                } 
    718721 
     722                do_action('xmlrpc_call', 'wp.getPostStatusList'); 
     723 
    719724                return get_post_statuses( ); 
    720725        } 
    721726 
     
    736741                        return new IXR_Error( 403, __( 'You are not allowed acces to details about this blog.' ) ); 
    737742                } 
    738743 
     744                do_action('xmlrpc_call', 'wp.getPageStatusList'); 
     745 
    739746                return get_page_statuses( ); 
    740747        } 
    741748 
     
    18961903                        return $this->error; 
    18971904                } 
    18981905 
     1906                do_action('xmlrpc_call', 'mt.getRecentPostTitles'); 
     1907 
    18991908                $posts_list = wp_get_recent_posts($num_posts); 
    19001909 
    19011910                if (!$posts_list) { 
     
    20482057        /* mt.supportedTextFilters ...returns an empty array because we don't 
    20492058                 support per-post text filters yet */ 
    20502059        function mt_supportedTextFilters($args) { 
     2060                do_action('xmlrpc_call', 'mt.supportedTextFilters'); 
    20512061                return apply_filters('xmlrpc_text_filters', array()); 
    20522062        } 
    20532063