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

git-svn-id: https://develop.svn.wordpress.org/trunk@11783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-08-06 20:48:59 +00:00
parent 3faf80baad
commit 4d26de281a
1 changed files with 2 additions and 2 deletions

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;