Changeset 16402
- Timestamp:
- 11/16/2010 04:22:09 PM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r16385 r16402 1932 1932 1933 1933 // Taxonomies 1934 $q['tax_query'] = $this->parse_tax_query( $q ); 1935 if ( !empty( $q['tax_query'] ) ) { 1934 $tax_query = $this->parse_tax_query( $q ); 1935 1936 if ( !empty( $tax_query ) ) { 1936 1937 if ( empty($post_type) ) { 1937 1938 $post_type = 'any'; … … 1941 1942 } 1942 1943 1943 $where .= get_tax_sql( $ q['tax_query'], "$wpdb->posts.ID" );1944 $where .= get_tax_sql( $tax_query, "$wpdb->posts.ID" ); 1944 1945 1945 1946 // Back-compat 1946 $tax_query_in = wp_list_filter( $ q['tax_query'], array( 'operator' => 'IN' ) );1947 $tax_query_in = wp_list_filter( $tax_query, array( 'operator' => 'IN' ) ); 1947 1948 if ( !empty( $tax_query_in ) ) { 1948 1949 if ( !isset( $q['taxonomy'] ) ) { -
trunk/wp-includes/taxonomy.php
r16382 r16402 594 594 595 595 if ( 1 == count( $sql ) ) { 596 $ ids= $wpdb->get_col( $sql[0] );596 $r = $wpdb->get_col( $sql[0] ); 597 597 } else { 598 598 $r = "SELECT object_id FROM $wpdb->term_relationships WHERE 1=1"; 599 599 foreach ( $sql as $query ) 600 600 $r .= " AND object_id IN ($query)"; 601 602 $ids = $wpdb->get_col( $r );603 601 } 604 602 605 603 if ( !empty( $ids ) ) 606 return " AND $object_id_column IN( " . implode( ', ', $ids ) . ")";604 return " AND $object_id_column IN($r)"; 607 605 else 608 606 return ' AND 0 = 1';
Note: See TracChangeset
for help on using the changeset viewer.