Make WordPress Core

Ticket #39019: 39019.patch

File 39019.patch, 1.1 KB (added by ramiy, 10 years ago)
  • wp-includes/class-wp-xmlrpc-server.php

     
    31333133                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    31343134                do_action( 'xmlrpc_call', 'wp.deleteCategory' );
    31353135
    3136                 if ( !current_user_can('manage_categories') )
    3137                         return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete a category.' ) );
     3136                if ( !current_user_can( 'manage_categories', $category_id ) )
     3137                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this category.' ) );
    31383138
    31393139                $status = wp_delete_term( $category_id, 'category' );
    31403140
    … …  
    33643364                }
    33653365
    33663366                if ( !current_user_can( 'edit_comment', $comment_ID ) ) {
    3367                         return new IXR_Error( 403, __( 'Sorry, you are not allowed to moderate or edit this comment.' ) );
     3367                        return new IXR_Error( 403, __( 'Sorry, you are not allowed to delete this comment.' ) );
    33683368                }
    33693369
    33703370                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */