| @@ 697-699 (lines=3) @@ | ||
| 694 | $this->sql_clauses['where']['post__not_in'] = 'comment_post_ID NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['post__not_in'] ) ) . ' )'; |
|
| 695 | } |
|
| 696 | ||
| 697 | if ( '' !== $this->query_vars['author_email'] ) { |
|
| 698 | $this->sql_clauses['where']['author_email'] = $this->db->prepare( 'comment_author_email = %s', $this->query_vars['author_email'] ); |
|
| 699 | } |
|
| 700 | ||
| 701 | if ( '' !== $this->query_vars['author_url'] ) { |
|
| 702 | $this->sql_clauses['where']['author_url'] = $this->db->prepare( 'comment_author_url = %s', $this->query_vars['author_url'] ); |
|
| @@ 701-703 (lines=3) @@ | ||
| 698 | $this->sql_clauses['where']['author_email'] = $this->db->prepare( 'comment_author_email = %s', $this->query_vars['author_email'] ); |
|
| 699 | } |
|
| 700 | ||
| 701 | if ( '' !== $this->query_vars['author_url'] ) { |
|
| 702 | $this->sql_clauses['where']['author_url'] = $this->db->prepare( 'comment_author_url = %s', $this->query_vars['author_url'] ); |
|
| 703 | } |
|
| 704 | ||
| 705 | if ( '' !== $this->query_vars['karma'] ) { |
|
| 706 | $this->sql_clauses['where']['karma'] = $this->db->prepare( 'comment_karma = %d', $this->query_vars['karma'] ); |
|
| @@ 705-707 (lines=3) @@ | ||
| 702 | $this->sql_clauses['where']['author_url'] = $this->db->prepare( 'comment_author_url = %s', $this->query_vars['author_url'] ); |
|
| 703 | } |
|
| 704 | ||
| 705 | if ( '' !== $this->query_vars['karma'] ) { |
|
| 706 | $this->sql_clauses['where']['karma'] = $this->db->prepare( 'comment_karma = %d', $this->query_vars['karma'] ); |
|
| 707 | } |
|
| 708 | ||
| 709 | // Filtering by comment_type: 'type', 'type__in', 'type__not_in'. |
|
| 710 | $raw_types = array( |
|
| @@ 759-761 (lines=3) @@ | ||
| 756 | ||
| 757 | if ( is_array( $this->query_vars['user_id'] ) ) { |
|
| 758 | $this->sql_clauses['where']['user_id'] = 'user_id IN (' . implode( ',', array_map( 'absint', $this->query_vars['user_id'] ) ) . ')'; |
|
| 759 | } elseif ( '' !== $this->query_vars['user_id'] ) { |
|
| 760 | $this->sql_clauses['where']['user_id'] = $this->db->prepare( 'user_id = %d', $this->query_vars['user_id'] ); |
|
| 761 | } |
|
| 762 | ||
| 763 | // Falsy search strings are ignored. |
|
| 764 | if ( strlen( $this->query_vars['search'] ) ) { |
|
| @@ 372-374 (lines=3) @@ | ||
| 369 | $this->sql_clauses['where']['network__not_in'] = "{$this->db->site}.id NOT IN ( " . implode( ',', wp_parse_id_list( $this->query_vars['network__not_in'] ) ) . ' )'; |
|
| 370 | } |
|
| 371 | ||
| 372 | if ( ! empty( $this->query_vars['domain'] ) ) { |
|
| 373 | $this->sql_clauses['where']['domain'] = $this->db->prepare( "{$this->db->site}.domain = %s", $this->query_vars['domain'] ); |
|
| 374 | } |
|
| 375 | ||
| 376 | // Parse network domain for an IN clause. |
|
| 377 | if ( is_array( $this->query_vars['domain__in'] ) ) { |
|
| @@ 386-388 (lines=3) @@ | ||
| 383 | $this->sql_clauses['where']['domain__not_in'] = "{$this->db->site}.domain NOT IN ( '" . implode( "', '", $this->db->_escape( $this->query_vars['domain__not_in'] ) ) . "' )"; |
|
| 384 | } |
|
| 385 | ||
| 386 | if ( ! empty( $this->query_vars['path'] ) ) { |
|
| 387 | $this->sql_clauses['where']['path'] = $this->db->prepare( "{$this->db->site}.path = %s", $this->query_vars['path'] ); |
|
| 388 | } |
|
| 389 | ||
| 390 | // Parse network path for an IN clause. |
|
| 391 | if ( is_array( $this->query_vars['path__in'] ) ) { |
|
| @@ 432-434 (lines=3) @@ | ||
| 429 | $this->sql_clauses['where']['network__not_in'] = 'site_id NOT IN ( ' . implode( ',', wp_parse_id_list( $this->query_vars['network__not_in'] ) ) . ' )'; |
|
| 430 | } |
|
| 431 | ||
| 432 | if ( ! empty( $this->query_vars['domain'] ) ) { |
|
| 433 | $this->sql_clauses['where']['domain'] = $this->db->prepare( 'domain = %s', $this->query_vars['domain'] ); |
|
| 434 | } |
|
| 435 | ||
| 436 | // Parse site domain for an IN clause. |
|
| 437 | if ( is_array( $this->query_vars['domain__in'] ) ) { |
|
| @@ 446-448 (lines=3) @@ | ||
| 443 | $this->sql_clauses['where']['domain__not_in'] = "domain NOT IN ( '" . implode( "', '", $this->db->_escape( $this->query_vars['domain__not_in'] ) ) . "' )"; |
|
| 444 | } |
|
| 445 | ||
| 446 | if ( ! empty( $this->query_vars['path'] ) ) { |
|
| 447 | $this->sql_clauses['where']['path'] = $this->db->prepare( 'path = %s', $this->query_vars['path'] ); |
|
| 448 | } |
|
| 449 | ||
| 450 | // Parse site path for an IN clause. |
|
| 451 | if ( is_array( $this->query_vars['path__in'] ) ) { |
|