Group by not needed for not_in and and taxonomy queries. Props Otto42. fixes #7761

git-svn-id: https://develop.svn.wordpress.org/trunk@8968 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-09-24 08:03:42 +00:00
parent 2fa7cd8715
commit d9c4380549
1 changed files with 2 additions and 3 deletions

View File

@ -1789,7 +1789,7 @@ class WP_Query {
$q['cat'] = implode(',', $req_cats);
}
if ( !empty($q['category__in']) || !empty($q['category__not_in']) || !empty($q['category__and']) ) {
if ( !empty($q['category__in']) ) {
$groupby = "{$wpdb->posts}.ID";
}
@ -1869,8 +1869,7 @@ class WP_Query {
}
}
if ( !empty($q['tag__in']) || !empty($q['tag__not_in']) || !empty($q['tag__and']) ||
!empty($q['tag_slug__in']) || !empty($q['tag_slug__and']) ) {
if ( !empty($q['tag__in']) || !empty($q['tag_slug__in']) ) {
$groupby = "{$wpdb->posts}.ID";
}