Ticket #18104: wp-class-xmlrpc-server.18104.patch
| File wp-class-xmlrpc-server.18104.patch, 1.5 KB (added by , 15 years ago) |
|---|
-
wp-includes/class-wp-xmlrpc-server.php
1134 1134 if ( !current_user_can( 'moderate_comments' ) ) 1135 1135 return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); 1136 1136 1137 if ( ! get_comment($comment_ID) ) 1138 return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); 1139 1137 1140 if ( !current_user_can( 'edit_comment', $comment_ID ) ) 1138 1141 return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); 1139 1142 1140 1143 do_action('xmlrpc_call', 'wp.deleteComment'); 1141 1144 1142 if ( ! get_comment($comment_ID) )1143 return new IXR_Error( 404, __( 'Invalid comment ID.' ) );1144 1145 1145 return wp_delete_comment($comment_ID); 1146 1146 } 1147 1147 … … 1184 1184 if ( !current_user_can( 'moderate_comments' ) ) 1185 1185 return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); 1186 1186 1187 if ( ! get_comment($comment_ID) ) 1188 return new IXR_Error( 404, __( 'Invalid comment ID.' ) ); 1189 1187 1190 if ( !current_user_can( 'edit_comment', $comment_ID ) ) 1188 1191 return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); 1189 1192 1190 1193 do_action('xmlrpc_call', 'wp.editComment'); 1191 1194 1192 if ( ! get_comment($comment_ID) )1193 return new IXR_Error( 404, __( 'Invalid comment ID.' ) );1194 1195 1195 if ( isset($content_struct['status']) ) { 1196 1196 $statuses = get_comment_statuses(); 1197 1197 $statuses = array_keys($statuses);