From 4d26de281a7fa68bfbd2756b3e04dc3d80c3a20e Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 6 Aug 2009 20:48:59 +0000 Subject: [PATCH] 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 --- xmlrpc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmlrpc.php b/xmlrpc.php index f7116b6d12..ac4ea4b399 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -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;