[buddypress-trac] [BuddyPress Trac] #7526: Counter for "All" tab for activity and groups table
buddypress-trac
noreply at wordpress.org
Thu Jul 27 10:27:57 UTC 2017
#7526: Counter for "All" tab for activity and groups table
-----------------------------------------+-----------------------------
Reporter: bhargavbhandari90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Activity | Version: 2.8.2
Severity: normal | Resolution:
Keywords: has-screenshots needs-patch |
-----------------------------------------+-----------------------------
Changes (by DJPaul):
* keywords: dev-feedback has-patch has-screenshots => has-screenshots
needs-patch
* milestone: Awaiting Review => Future Release
Comment:
I suspect it was because the number wasn't convenient in the database
queries we are making to build that page.
Your patch has the problem of the query not being cached, of hardcoding
the table name (I think we have this as a property on the main class for
each Component, e.g. `bp()->activity`), and because this is not using the
existing Activity API.
The last point is not a strict rule, but it's something we like. So, if
you can't find the same total number in the activities global object
somewhere, then you'd need to add caching around the query, and double-
check that we don't hard-code the query name elsewhere (I might be
remembering wrong).
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7526#comment:8>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list