wpdb::has_cap() from mdawaffe. fixes #7609

git-svn-id: https://develop.svn.wordpress.org/trunk@8740 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-08-26 23:57:48 +00:00
parent e4dd07c75e
commit 9ab6c5d3f7
3 changed files with 20 additions and 11 deletions
+1 -1
View File
@@ -1046,7 +1046,7 @@ class WP_Query {
}
if ( !empty($q['category__not_in']) ) {
if ( $wpdb->supports_subqueries() ) {
if ( $wpdb->has_cap( 'subqueries' ) ) {
$cat_string = "'" . implode("', '", $q['category__not_in']) . "'";
$whichcat .= " AND $wpdb->posts.ID NOT IN (SELECT $wpdb->term_relationships.object_id FROM $wpdb->term_relationships WHERE $wpdb->term_relationships.term_taxonomy_id IN ($cat_string) )";
} else {