Changeset 5858 for trunk/src/includes/topics/functions.php
- Timestamp:
- 07/16/2015 04:15:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r5837 r5858 2519 2519 // Get replies of topic 2520 2520 if ( empty( $reply_count ) ) { 2521 $statuses = array( bbp_get_trash_status_id(), bbp_get_spam_status_id(), bbp_get_pending_status_id() ); 2522 $post_status = "'" . implode( "','", $statuses ) . "'"; 2521 2523 $bbp_db = bbp_db(); 2522 $post_status = "'" . implode( "','", array( bbp_get_trash_status_id(), bbp_get_spam_status_id(), bbp_get_pending_status_id() ) ) . "'";2523 2524 $query = $bbp_db->prepare( "SELECT COUNT(ID) FROM {$bbp_db->posts} WHERE post_parent = %d AND post_status IN ( {$post_status} ) AND post_type = '%s';", $topic_id, bbp_get_reply_post_type() ); 2524 2525 $reply_count = $bbp_db->get_var( $query );
Note: See TracChangeset
for help on using the changeset viewer.