Skip to:
Content

BuddyPress.org

Opened 10 years ago

Last modified 9 years ago

#6370 closed enhancement

Blogs: Improvements to bp_blogs_record_existing_blogs() — at Version 1

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.1
Component: Blogs Keywords: dev-feedback needs-testing has-patch
Cc:

Description (last modified by r-a-y)

bp_blogs_record_existing_blogs() doesn't really do a good job with recording existing blogs especially when the "Repopulate blogs records" option is used from the "Tools > BuddyPress" admin page.

Attached patch improves the function by:

  • Supporting 'limit' and 'offset' in the initial blog query.
  • Saving the offset just in case the function hangs so the function can be resumed from that offset on the next run.
  • Supporting passing selected blog IDs in case a dev wants to re-record specific blogs
  • Fixing blog count caches by using bp_blogs_clear_blog_object_cache()
  • Giving each blog a better last activity timestamp by using the last_updated column from the wp_blogs column

Change History (2)

@r-a-y
10 years ago

#1 @r-a-y
10 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.