WordPress.org

Make WordPress Core

Changeset 17805


Ignore:
Timestamp:
05/05/2011 04:08:22 AM (7 years ago)
Author:
dd32
Message:

Do not return duplicate posts for Meta Queries. Props Greuben. Fixes #17264 for 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/query.php

    r17611 r17805  
    22322232        }
    22332233
    2234         if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) {
    2235             $groupby = "{$wpdb->posts}.ID";
    2236         }
    2237 
    22382234        // Author/user stuff
    22392235
     
    24792475            $join .= $clauses['join'];
    24802476            $where .= $clauses['where'];
     2477        }
     2478
     2479        if ( ! empty( $this->tax_query->queries ) || ! empty( $q['meta_query'] ) ) {
     2480            $groupby = "{$wpdb->posts}.ID";
    24812481        }
    24822482
Note: See TracChangeset for help on using the changeset viewer.