Fix 'count' in WP_Comment_Query when using 'meta_query'.

Props heshiming, desaiuditd.
Fixes #23369.
Built from https://develop.svn.wordpress.org/trunk@30026


git-svn-id: http://core.svn.wordpress.org/trunk@30026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2014-10-26 16:46:19 +00:00
parent a8f8a655f2
commit 3179629853
2 changed files with 5 additions and 2 deletions

View File

@ -559,7 +559,10 @@ class WP_Comment_Query {
$clauses = $this->meta_query->get_sql( 'comment', $wpdb->comments, 'comment_ID', $this );
$join .= $clauses['join'];
$where .= $clauses['where'];
$groupby = "{$wpdb->comments}.comment_ID";
if ( ! $this->query_vars['count'] ) {
$groupby = "{$wpdb->comments}.comment_ID";
}
}
$date_query = $this->query_vars['date_query'];

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-30025';
$wp_version = '4.1-alpha-30026';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.