Do not return duplicate posts for Meta Queries. Props Greuben. Fixes #17264 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
61e239a533
commit
695d2fa734
|
@ -2231,10 +2231,6 @@ class WP_Query {
|
|||
}
|
||||
}
|
||||
|
||||
if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) {
|
||||
$groupby = "{$wpdb->posts}.ID";
|
||||
}
|
||||
|
||||
// Author/user stuff
|
||||
|
||||
if ( empty($q['author']) || ($q['author'] == '0') ) {
|
||||
|
@ -2480,6 +2476,10 @@ class WP_Query {
|
|||
$where .= $clauses['where'];
|
||||
}
|
||||
|
||||
if ( ! empty( $this->tax_query->queries ) || ! empty( $q['meta_query'] ) ) {
|
||||
$groupby = "{$wpdb->posts}.ID";
|
||||
}
|
||||
|
||||
// Apply filters on where and join prior to paging so that any
|
||||
// manipulations to them are reflected in the paging by day queries.
|
||||
if ( !$q['suppress_filters'] ) {
|
||||
|
|
Loading…
Reference in New Issue