From 0d3270282d090e172b28c2cacfbee0e0ec5fe48c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Nov 2014 01:29:24 +0000 Subject: [PATCH] In `wp_xmlrpc_server->_prepare_comment()`, `$comment_date` is set internally but never used. See #30224. Built from https://develop.svn.wordpress.org/trunk@30137 git-svn-id: http://core.svn.wordpress.org/trunk@30137 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 11 +++++------ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 3a792c21bb..ab44a42221 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -972,18 +972,17 @@ class wp_xmlrpc_server extends IXR_Server { */ protected function _prepare_comment( $comment ) { // Format page date. - $comment_date = $this->_convert_date( $comment->comment_date ); $comment_date_gmt = $this->_convert_date_gmt( $comment->comment_date_gmt, $comment->comment_date ); - if ( '0' == $comment->comment_approved ) + if ( '0' == $comment->comment_approved ) { $comment_status = 'hold'; - else if ( 'spam' == $comment->comment_approved ) + } elseif ( 'spam' == $comment->comment_approved ) { $comment_status = 'spam'; - else if ( '1' == $comment->comment_approved ) + } elseif ( '1' == $comment->comment_approved ) { $comment_status = 'approve'; - else + } else { $comment_status = $comment->comment_approved; - + } $_comment = array( 'date_created_gmt' => $comment_date_gmt, 'user_id' => $comment->user_id, diff --git a/wp-includes/version.php b/wp-includes/version.php index 8cd37c3baa..b7de5c8ff8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30136'; +$wp_version = '4.1-alpha-30137'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.