Ticket #5248: 13682.diff
| File 13682.diff, 1001 bytes (added by , 16 years ago) |
|---|
-
wp-includes/query.php
1875 1875 $q['cat'] = $reqcat; 1876 1876 1877 1877 $join = " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) "; 1878 $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' ";1878 $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' "; 1879 1879 $in_cats = array($q['cat']); 1880 1880 $in_cats = array_merge($in_cats, get_term_children($q['cat'], 'category')); 1881 1881 $in_cats = "'" . implode("', '", $in_cats) . "'"; … … 1961 1961 if ( count($post_ids) ) 1962 1962 $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") "; 1963 1963 else { 1964 $whichcat = " AND 0 = 1";1964 $whichcat .= " AND 0 = 1"; 1965 1965 break; 1966 1966 } 1967 1967 }