WordPress.org

Make WordPress Core

Changeset 16403


Ignore:
Timestamp:
11/16/2010 04:24:14 PM (9 years ago)
Author:
scribu
Message:

Revert taxonomy.php part of [16402]. Not fully backed yet. See #12891

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r16402 r16403  
    594594
    595595    if ( 1 == count( $sql ) ) {
    596         $r = $wpdb->get_col( $sql[0] );
     596        $ids = $wpdb->get_col( $sql[0] );
    597597    } else {
    598598        $r = "SELECT object_id FROM $wpdb->term_relationships WHERE 1=1";
    599599        foreach ( $sql as $query )
    600600            $r .= " AND object_id IN ($query)";
     601
     602        $ids = $wpdb->get_col( $r );
    601603    }
    602604
    603605    if ( !empty( $ids ) )
    604         return " AND $object_id_column IN($r)";
     606        return " AND $object_id_column IN(" . implode( ', ', $ids ) . ")";
    605607    else
    606608        return ' AND 0 = 1';
Note: See TracChangeset for help on using the changeset viewer.