mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@32461 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user