[buddypress-trac] [BuddyPress Trac] #5296: Add tools for repairing relationships - Friend Counts

buddypress-trac noreply at wordpress.org
Thu Feb 27 20:50:58 UTC 2014


#5296: Add tools for repairing relationships - Friend Counts
--------------------------+------------------
 Reporter:  cmmarslender  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  2.0
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by boonebgorges):

 5296.patch is an update of cmmarslender's excellent first patch with the
 following modifications:

 - Moved to a Tools subtab of the BuddyPress admin pages
 - Replaced some direct SQL queries/calls to update_user_meta with existing
 API functions
 - Lightened the load of some count queries by avoiding `get_users()`. We
 don't currently add 0 values for total_group_count and total_friend_count
 in most cases, so there's no real point to setting those values for users
 who have no counts. So I've taken a quick-and-dirty approach to ensuring
 that we only update values for users who will have a value.
 - Removed total_blog_count and activity_mention count tools. As
 cmmarslender's inline note said, we don't really have anything to count
 for activity mentions. As for blog counts, we don't store this in usermeta
 anyway. (We do cache it using `wp_cache_set()`, but I wasn't sure if it
 was worth creating a tool just to fix this).

 I think this is ready to commit and then iterate on (and to add more tasks
 to) but I would first like another set of eyes on it. Thanks.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5296#comment:13>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list