diff --git src/bp-activity/classes/class-bp-activity-activity.php src/bp-activity/classes/class-bp-activity-activity.php
index 7c879d6..629c439 100644
|
|
class BP_Activity_Activity { |
528 | 528 | $pag_sql = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page ); |
529 | 529 | |
530 | 530 | /** This filter is documented in bp-activity/bp-activity-classes.php */ |
531 | | $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 ) ); |
| 531 | $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}, a.id {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) ); |
532 | 532 | } else { |
533 | 533 | $pag_sql = ''; |
534 | 534 | |
… |
… |
class BP_Activity_Activity { |
543 | 543 | * @param string $where_sql Final WHERE MySQL statement portion for legacy query. |
544 | 544 | * @param string $sort Final sort direction for legacy query. |
545 | 545 | */ |
546 | | $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 ) ); |
| 546 | $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}, a.id {$sort}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) ); |
547 | 547 | } |
548 | 548 | |
549 | 549 | } else { |
550 | 550 | // Query first for activity IDs. |
551 | | $activity_ids_sql = "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}"; |
| 551 | $activity_ids_sql = "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}, a.id {$sort}"; |
552 | 552 | |
553 | 553 | if ( ! empty( $per_page ) && ! empty( $page ) ) { |
554 | 554 | // We query for $per_page + 1 items in order to |