Ticket #3591: 3591.patch
| File 3591.patch, 1004 bytes (added by , 2 years ago) |
|---|
-
includes/admin/tools/repair.php
497 497 $statement = esc_html__( 'Counting the number of topics each user has created… %s', 'bbpress' ); 498 498 $result = esc_html__( 'Failed!', 'bbpress' ); 499 499 500 $sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` = '" . bbp_get_public_status_id() . "'GROUP BY `post_author`";500 $sql_select = "SELECT `post_author`, COUNT(DISTINCT `ID`) as `_count` FROM `{$bbp_db->posts}` WHERE `post_type` = '" . bbp_get_topic_post_type() . "' AND `post_status` IN ('" . bbp_get_public_status_id() . "', '" . bbp_get_closed_status_id() . "') GROUP BY `post_author`"; 501 501 $insert_rows = $bbp_db->get_results( $sql_select ); 502 502 503 503 if ( is_wp_error( $insert_rows ) ) {