mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
Do not return duplicate posts for Meta Queries. Props Greuben. Fixes #17264 for 3.1
git-svn-id: https://develop.svn.wordpress.org/branches/3.1@17805 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ad77c266b9
commit
b4d82f8dc8
@ -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…
x
Reference in New Issue
Block a user