Opened 13 years ago
Closed 13 years ago
#4066 closed defect (bug) (fixed)
Recently Active Members Sidebar Widget Bug
Reported by: | slickremix.com | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | minor | Version: | 1.5.4 |
Component: | Core | Keywords: | |
Cc: | spencer@… |
Description
We found a bug that needs to be fixed in buddypress's core files! When we are using "recently active members" widget on the requests page (under the friends) Its saying "no recently active members" even though every other page is showing the recently active members. I think there may be conflicting PHP functions happening.
Change History (3)
#2
@
13 years ago
- Milestone changed from Awaiting Review to 1.6
- Severity changed from normal to minor
Confirmed. This bug is related to a hardcoded method we use for returning false from bp_has_members() when viewing the 'requests' page. In an ideal world, we would have fine-grained arguments for requesting users based on friendship status, but this would require a large rewrite of bp_has_members() stack, which is probably not worth it for this somewhat obscure bug.
Since we are currently using the 'include' parameter of bp_has_members() to do friendship request filtering, I have opted for a technique that allows a 0 value to be respected in BP_Core_User::get_users(). That way, the default value of $include - false - will continue to operate on the same logic as before, as will int/string single values, while values of 0 or '0' will append "AND 0 = 1" to the sql query.
#3
@
13 years ago
- Resolution set to fixed
- Status changed from new to closed
(In [5906]) Reworks some functions around the querying of friendship requests:
- Refactors bp_get_friendship_requests() so that it accepts a manual user_id parameter, and so that it falls back on the displayed_user rather than the loggedin_user (for future administrative tasks)
- Reconfigures the return value of bp_get_friendship_requests() so that a 0 is returned when there are no pending requests, to ensure that a non-false value is passed to bp_has_members() when viewing the Requests page of a user with no pending requests
- Removes the hardcoded 'return false' from bp_has_members() that would occur when an empty 'include' parameter was passed on the Requests page, so that sidebar widgets using bp_has_members() would work properly
- Reconfigures the 'include' logic in BP_Core_User::get_users() so that a value of 0 or '0' results in a false result, while continuing to respect legacy behavior of the default false value
- Fixes #4066
Actually it is also bugging with the "who's online" widget also.