Skip to:
Content

Opened 9 years ago

Closed 8 years ago

#2098 closed enhancement (fixed)

[patch] BP_Activity_Activity::get_filter_sql() should be using IN operator for list queries HAS-PATCH

Reported by: MrMaz Owned by: MrMaz
Milestone: 1.5 Priority: major
Severity: Version:
Component: Core Keywords: activity filter get_filter_sql has-patch
Cc:

Description

Here is a patch to improve the performance and security of the activity get() queries that rely on lists of ids, actions etc by utilizing the IN operator and also by passing all data through prepare.

Attachments (1)

bp-activity-classes.php.patch (3.9 KB) - added by MrMaz 9 years ago.

Download all attachments as: .zip

Change History (6)

#1 @MrMaz
9 years ago

Forgot to mention that this patch has NOT been tested yet.

#2 @MrMaz
9 years ago

  • Keywords has-patch added
  • Summary changed from BP_Activity_Activity::get_filter_sql() should be using IN operator for list queries to BP_Activity_Activity::get_filter_sql() should be using IN operator for list queries HAS-PATCH

#3 @DJPaul
9 years ago

  • Component set to Core
  • Owner set to MrMaz
  • Status changed from new to assigned

One of yours, MrMaz ;)

#4 @paulhastings0
8 years ago

  • Summary changed from BP_Activity_Activity::get_filter_sql() should be using IN operator for list queries HAS-PATCH to [patch] BP_Activity_Activity::get_filter_sql() should be using IN operator for list queries HAS-PATCH

#5 @mrmaz
8 years ago

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

(In [3345]) fixes #2098, IN operator is better than OR

Note: See TracTickets for help on using tickets.