Ticket #3429: 3429.patch
| File 3429.patch, 1.4 KB (added by , 3 years ago) |
|---|
-
src/includes/users/functions.php
699 699 700 700 // Check meta for count, or query directly if not found 701 701 $count = bbp_get_user_topic_count( $user_id, true ); 702 if ( empty( $count ) ) { 703 $count = bbp_get_user_topic_count_raw( $user_id ); 704 } 702 if ( empty( $count ) ) { 703 $count = bbp_get_user_topic_count_raw( $user_id ); 704 // The raw count holds the truth (it's been updated already at this point). 705 // Don't bump the true value, so set difference to 0. 706 $difference = 0; 707 } 705 708 706 709 $difference = (int) $difference; 707 710 $user_topic_count = (int) ( $count + $difference ); … … 735 738 736 739 // Check meta for count, or query directly if not found 737 740 $count = bbp_get_user_reply_count( $user_id, true ); 738 if ( empty( $count ) ) { 739 $count = bbp_get_user_reply_count_raw( $user_id ); 740 } 741 if ( empty( $count ) ) { 742 $count = bbp_get_user_reply_count_raw( $user_id ); 743 // The raw count holds the truth (it's been updated already at this point). 744 // Don't bump the true value, so set difference to 0. 745 $difference = 0; 746 } 741 747 742 748 $difference = (int) $difference; 743 749 $user_reply_count = (int) ( $count + $difference );