WordPress.org

Make WordPress Core

Ticket #5248: query-patch.php

File query-patch.php, 721 bytes (added by jaroche, 8 years ago)
Line 
1--- wp-svn/wp-includes/query.php        2007-10-19 12:06:13.000000000 -0600
2+++ wpsvn/wp-includes/query.php 2007-10-23 09:01:27.000000000 -0600
3@@ -974,7 +974,7 @@
4                        $q['cat'] = $reqcat;
5 
6                        $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) ";
7-                       $whichcat = " AND $wpdb->term_taxonomy.taxonomy = 'category' ";
8+                       $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'category' ";
9                        $in_cats = array($q['cat']);
10                        $in_cats = array_merge($in_cats, get_term_children($q['cat'], 'category'));
11                        $in_cats = "'" . implode("', '", $in_cats) . "'";