Changeset 11259
- Timestamp:
- 05/11/2009 04:56:00 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r11230 r11259 2110 2110 } 2111 2111 if ( $post_status_join ) { 2112 $join .= " LEFTJOIN $wpdb->posts AS p2 ON ($wpdb->posts.post_parent = p2.ID) ";2112 $join .= " JOIN $wpdb->posts AS p2 ON ($wpdb->posts.post_parent = p2.ID) "; 2113 2113 foreach ( $statuswheres as $index => $statuswhere ) 2114 2114 $statuswheres[$index] = "($statuswhere OR ($wpdb->posts.post_status = 'inherit' AND " . str_replace($wpdb->posts, 'p2', $statuswhere) . "))"; … … 2131 2131 // postmeta queries 2132 2132 if ( ! empty($q['meta_key']) || ! empty($q['meta_value']) ) 2133 $join .= " LEFTJOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) ";2133 $join .= " JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) "; 2134 2134 if ( ! empty($q['meta_key']) ) 2135 2135 $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s ", $q['meta_key']); … … 2169 2169 if ( $this->is_comment_feed && ( $this->is_archive || $this->is_search || !$this->is_singular ) ) { 2170 2170 if ( $this->is_archive || $this->is_search ) { 2171 $cjoin = " LEFTJOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) $join ";2171 $cjoin = "JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) $join "; 2172 2172 $cwhere = "WHERE comment_approved = '1' $where"; 2173 2173 $cgroupby = "$wpdb->comments.comment_id"; 2174 2174 } else { // Other non singular e.g. front 2175 $cjoin = " LEFTJOIN $wpdb->posts ON ( $wpdb->comments.comment_post_ID = $wpdb->posts.ID )";2175 $cjoin = "JOIN $wpdb->posts ON ( $wpdb->comments.comment_post_ID = $wpdb->posts.ID )"; 2176 2176 $cwhere = "WHERE post_status = 'publish' AND comment_approved = '1'"; 2177 2177 $cgroupby = '';
Note: See TracChangeset
for help on using the changeset viewer.