2986 | | $sql = "SELECT DISTINCT post_author FROM {$bbp_db->posts} WHERE ( post_parent = %d AND post_status = %s AND post_type = %s ) OR ( ID = %d AND post_type = %s )"; |
2987 | | $query = $bbp_db->prepare( $sql, $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ); |
| 2987 | $sql = "SELECT DISTINCT( post_author ) FROM ( |
| 2988 | SELECT post_author FROM {$bbp_db->posts} |
| 2989 | WHERE ( ID = %d AND post_type = %s ) |
| 2990 | UNION |
| 2991 | SELECT post_author FROM {$bbp_db->posts} |
| 2992 | WHERE ( post_parent = %d AND post_status = %s AND post_type = %s ) |
| 2993 | ) as u1"; |
| 2994 | $query = $bbp_db->prepare( $sql, $topic_id, bbp_get_topic_post_type(), $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type() ); |