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
This commit is contained in:
Scott Taylor 2014-11-01 01:29:24 +00:00
parent fcbc7b5a78
commit 0d3270282d
2 changed files with 6 additions and 7 deletions

View File

@ -972,18 +972,17 @@ class wp_xmlrpc_server extends IXR_Server {
*/ */
protected function _prepare_comment( $comment ) { protected function _prepare_comment( $comment ) {
// Format page date. // 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 ); $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'; $comment_status = 'hold';
else if ( 'spam' == $comment->comment_approved ) } elseif ( 'spam' == $comment->comment_approved ) {
$comment_status = 'spam'; $comment_status = 'spam';
else if ( '1' == $comment->comment_approved ) } elseif ( '1' == $comment->comment_approved ) {
$comment_status = 'approve'; $comment_status = 'approve';
else } else {
$comment_status = $comment->comment_approved; $comment_status = $comment->comment_approved;
}
$_comment = array( $_comment = array(
'date_created_gmt' => $comment_date_gmt, 'date_created_gmt' => $comment_date_gmt,
'user_id' => $comment->user_id, 'user_id' => $comment->user_id,

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.