From 36f9811fa1f7fcde4e4890c720915a4c89fd24b8 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 19 Jan 2009 18:47:24 +0000 Subject: [PATCH] XMLRPC wp_newComment() fixes. Props josephscott. fixes #8672 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10380 602fd350-edb4-49c9-b593-d223f7449a82 --- xmlrpc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xmlrpc.php b/xmlrpc.php index fe106873d9..c45b14fac7 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -1258,8 +1258,6 @@ class wp_xmlrpc_server extends IXR_Server { } else { $logged_in = true; set_current_user( 0, $username ); - if ( !current_user_can( 'moderate_comments' ) ) - return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this blog.' ) ); } if ( is_numeric($post) ) @@ -1285,12 +1283,15 @@ class wp_xmlrpc_server extends IXR_Server { $comment['comment_author'] = ''; if ( isset($content_struct['author']) ) $comment['comment_author'] = $content_struct['author']; + $comment['comment_author_email'] = ''; - if ( isset($content_struct['author']) ) + if ( isset($content_struct['author_email']) ) $comment['comment_author_email'] = $content_struct['author_email']; + $comment['comment_author_url'] = ''; - if ( isset($content_struct['author']) ) + if ( isset($content_struct['author_url']) ) $comment['comment_author_url'] = $content_struct['author_url']; + $comment['user_ID'] = 0; if ( get_option('require_name_email') ) {