#3147 closed enhancement (fixed)
BP_Core_User::$total_blogs
Reported by: | Backie | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | minor |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
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)
Change History (9)
#1
@
13 years ago
- Milestone changed from Awaiting Review to Future Release
- Priority changed from normal to minor
- Type changed from defect to enhancement
#2
@
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
@
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
@
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.
#6
@
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.
That dates from BuddyPress 1.1.x: http://trac.buddypress.org/browser/branches/1.1/bp-core/bp-core-classes.php#L71
I don't think core uses BP_Core_User->total_friends or total_groups any more, either. Maybe we can get rid of them