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

git-svn-id: http://svn.automattic.com/wordpress/trunk@8968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-24 08:03:42 +00:00
parent 9343bc92e8
commit c9cad6e514
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";
}