Skip to:
Content

BuddyPress.org

Changeset 9087


Ignore:
Timestamp:
10/18/2014 12:18:35 PM (10 years ago)
Author:
boonebgorges
Message:

Pass $pag_sql variable to 'bp_activity_get_user_join_filter'.

There are two instances of this filter, and the first one had this $pag_sql
variable passed to it, while it was missing in the second case (where there is
no pagination). For greater consistency in documentation and plugin
development, we match the format of the variables passed to each instance of
the filter.

See #5938.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-classes.php

    r8977 r9087  
    458458                $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
    459459            } else {
    460                 $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort ) );
     460                $pag_sql    = '';
     461                $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
    461462            }
    462463
Note: See TracChangeset for help on using the changeset viewer.