Skip to:

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3147 closed enhancement (fixed)


Reported by: backie's profile Backie Owned by:
Milestone: 1.5 Priority: minor
Severity: normal Version:
Component: Core Keywords: has-patch


I'm phpDoc'ing BP_Core_User and noticed $total_blogs isn't used, I suspect it should be getting populated during the BP_Core_User::populate_extras() call.

Since I am not sure if there is a pre-made function to fetch this data I haven't made a patch.

Attachments (1)

delete_total_blogs_var.patch (460 bytes) - added by slaFFik 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Priority changed from normal to minor
  • Type changed from defect to enhancement

That dates from BuddyPress 1.1.x:
I don't think core uses BP_Core_User->total_friends or total_groups any more, either. Maybe we can get rid of them

#2 @slaFFik
13 years ago

  • Keywords has-patch added
  • Severity set to normal

I think we should remain total groups - in case some plugins will use it.
I have deleted total blogs var. Patch attached.

#3 @boonebgorges
13 years ago

I'd rather not remove it, on the off chance that a plugin is using it. I'll just mark the property as deprecated.

#4 @slaFFik
13 years ago

But it's not aggregating anything in that class. So it's just an empty var - always. Don't know how it might be used by not giving it some value.
On the other hand total_groups has a value - so it should stay intact.
But as you wish, of course.

#5 @boonebgorges
13 years ago

(In [4896]) Marks BP_Core_User::total_blogs as deprecated. See #3147

#6 @boonebgorges
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

There may be a plugin that is extending BP_Core_User, and populating $total_blogs on their own. If I remove the declaration from the class, they'll get errors.

As for the question of $total_groups and $total_friends, I think that we will leave them in case of a plugin using them. Since they are only populated if you pass $populate_extras = true to the constructor (it's false by default), the presence of these properties doesn't have any performance effects for the average user.

#7 @slaFFik
13 years ago

Ok, thanks for explanation. Really appreciate your time for that.

#8 @johnjamesjacoby
13 years ago

  • Milestone changed from Future Release to 1.5

Moving closed ticket out of Future Release.

Note: See TracTickets for help on using tickets.