--- xmlrpc.php.201102181045	2011-02-18 10:45:34.000000000 +0100
+++ xmlrpc.php	2011-02-18 11:08:55.000000000 +0100
@@ -154,6 +154,7 @@
 			'wp.editComment'		=> 'this:wp_editComment',
 			'wp.newComment'			=> 'this:wp_newComment',
 			'wp.getCommentStatusList' => 'this:wp_getCommentStatusList',
+			'wp.getCommentsStatusCount' => 'this:wp_getCommentsStatusCount',
 
 			// Blogger API
 			'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
@@ -1345,6 +1346,32 @@
 
 		return get_comment_statuses( );
 	}
+	/**
+	 * Retrieve number of comments in a given status.
+	 *
+	 * @since 2.7.0
+	 *
+	 * @param array $args Method parameters.
+	 * @return array
+	 */
+	function wp_getCommentsStatusCount($args) {
+		$this->escape( $args );
+
+		$blog_id	= (int) $args[0];
+		$username	= $args[1];
+		$password	= $args[2];
+		$status		= $args[3];
+
+		if ( !$user = $this->login($username, $password) )
+			return $this->error;
+
+		if ( !current_user_can( 'moderate_comments' ) )
+			return new IXR_Error( 403, __( 'You are not allowed access to details about this site.' ) );
+
+		do_action('xmlrpc_call', 'wp.getCommentsStatusCount');
+		$comments=get_comments( 'status=spam');
+		return count($comments);
+	}
 
 	/**
 	 * Retrieve comment count.
@@ -3372,4 +3399,4 @@
 
 $wp_xmlrpc_server = new wp_xmlrpc_server();
 $wp_xmlrpc_server->serve_request();
-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
