Ticket #5248: 5248.diff
| File 5248.diff, 992 bytes (added by , 19 years ago) |
|---|
-
wp-includes/query.php
974 974 $q['cat'] = $reqcat; 975 975 976 976 $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) "; 977 $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' ";977 $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' "; 978 978 $in_cats = array($q['cat']); 979 979 $in_cats = array_merge($in_cats, get_term_children($q['cat'], 'category')); 980 980 $in_cats = "'" . implode("', '", $in_cats) . "'"; … … 1058 1058 if ( count($post_ids) ) 1059 1059 $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") "; 1060 1060 else { 1061 $whichcat = " AND 0 = 1";1061 $whichcat .= " AND 0 = 1"; 1062 1062 break; 1063 1063 } 1064 1064 }