Opened 12 years ago
Closed 11 years ago
#2349 closed defect (bug) (fixed)
bbP's internal private and forum IDs not updated when adding a forum into BuddyPress
Reported by: | r-a-y | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.4 | Priority: | normal |
Severity: | normal | Version: | 2.2 |
Component: | Extend - BuddyPress | Keywords: | has-patch |
Cc: |
Description
If you add a forum to a private or hidden group in BuddyPress, bbPress does not record that forum ID into its '_bbp_{visibility}_forums'
DB option.
This creates problems as the Recent Topics / Replies widgets, which rely on these DB options, will show private forum content to the public.
To address this, I decided to move the utility function - bbp_admin_repair_forum_visibility()
- from admin/tools.php into forums/functions.php so we can use it in a more general sense like I have in /extend/buddypress/group.php.
Yes, this is more of a brute-force way of fixing the issue, but this also ensures that all forum IDs in bbPress are updated.
If moving the bbp_admin_repair_forum_visibility()
function isn't desired, then some form of update_option()
approach will be needed.
In 5017: