Project

General

Profile

Bug #10685

Social Paper activity filter should only apply when activity scope includes SP types

Added by Boone Gorges 3 months ago. Updated 2 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Social Paper
Target version:
Start date:
2018-11-08
Due date:
% Done:

0%

Estimated time:

Description

Social Paper filters activity queries to ensure that items related to private SPs are not included in activity streams. https://github.com/cuny-academic-commons/social-paper/blob/master/includes/hooks-buddypress-activity.php#L444 This filter adds overhead, since it requires a cacsp_get_protected_papers_for_user() query.

We can reduce this overhead by bailing out of the filter when we know that SP types will not be included in the results. We should be able to figure this out by looking at the 'type' value. See the $r param at https://buddypress.trac.wordpress.org/browser/tags/3.2.0/src/bp-activity/classes/class-bp-activity-activity.php?marks=570#L559

History

#1 Updated by Boone Gorges 3 months ago

  • Target version changed from 1.13.13 to 1.14.1

#2 Updated by Boone Gorges 3 months ago

  • Target version changed from 1.14.1 to 1.14.2

Also available in: Atom PDF