[buddypress-trac] [BuddyPress] #5300: Notifications from inactive components are rendered on the Notifications panel

buddypress-trac noreply at wordpress.org
Tue Dec 17 19:10:43 UTC 2013


#5300: Notifications from inactive components are rendered on the Notifications
panel
-------------------------------------------------+-------------------------
 Reporter:  boonebgorges                         |       Owner:
     Type:  defect (bug)                         |  johnjamesjacoby
 Priority:  normal                               |      Status:  reopened
Component:  Notifications                        |   Milestone:  1.9.1
 Severity:  normal                               |     Version:
 Keywords:  has-patch 2nd-opinion needs-unit-    |  Resolution:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by boonebgorges):

 I've though about this a bit. My take is that the purpose of
 `get_where_sql()` is to translate arguments into sql statements. Our
 decision to interpret a null 'component_name' as "active components" is
 really something that should happen at a bit of a higher level, to make
 tracing easier for developers.

 For that reason, I'm going to commit a fix that leaves `get_where_sql()`
 the way it is, and instead moves the active-components stuff into
 `BP_Notifications_Notification::get_total_count()`. This results in a very
 small amount of code duplication (between the latter method and `get()`),
 but it makes much more sense semantically, because this kind of thing is
 exactly what `wp_parse_args()` is meant for.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5300#comment:14>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list