Use table prefix for comment__in and comment__not_in SQL clauses of WP_Comment_Query.

The prefix prevents ambiguity when joining against other tables.

Props willgladstone.
Fixes #32081.
Built from https://develop.svn.wordpress.org/trunk@32461


git-svn-id: http://core.svn.wordpress.org/trunk@32431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-05-08 19:45:26 +00:00
parent af326241ff
commit 3f642ba717
2 changed files with 3 additions and 3 deletions

View File

@ -696,12 +696,12 @@ class WP_Comment_Query {
// Parse comment IDs for an IN clause.
if ( ! empty( $this->query_vars['comment__in'] ) ) {
$where[] = 'comment_ID IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['comment__in'] ) ) . ' )';
$where[] = "$wpdb->comments.comment_ID IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['comment__in'] ) ) . ' )';
}
// Parse comment IDs for a NOT IN clause.
if ( ! empty( $this->query_vars['comment__not_in'] ) ) {
$where[] = 'comment_ID NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['comment__not_in'] ) ) . ' )';
$where[] = "$wpdb->comments.comment_ID NOT IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['comment__not_in'] ) ) . ' )';
}
// Parse comment post IDs for an IN clause.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32460';
$wp_version = '4.3-alpha-32461';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.