Ensure that XMLRPC clients can tell the difference between unapproved and spam comments. Fixes #10510 props josephscott.

git-svn-id: http://svn.automattic.com/wordpress/trunk@11783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-08-06 20:48:59 +00:00
parent 1199fd75f0
commit 07c88e581e

View File

@ -1055,11 +1055,11 @@ class wp_xmlrpc_server extends IXR_Server {
$comment_date = mysql2date("Ymd\TH:i:s", $comment->comment_date, false);
$comment_date_gmt = mysql2date("Ymd\TH:i:s", $comment->comment_date_gmt, false);
if ( 0 == $comment->comment_approved )
if ( '0' == $comment->comment_approved )
$comment_status = 'hold';
else if ( 'spam' == $comment->comment_approved )
$comment_status = 'spam';
else if ( 1 == $comment->comment_approved )
else if ( '1' == $comment->comment_approved )
$comment_status = 'approve';
else
$comment_status = $comment->comment_approved;