Skip to:
Content

BuddyPress.org

Ticket #7146: 7146.01.patch

File 7146.01.patch, 1.3 KB (added by r-a-y, 4 years ago)
  • src/bp-activity/classes/class-bp-activity-activity.php

     
    613613                                $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 ) );
    614614                        }
    615615
     616                        // Integer casting for legacy activity query.
     617                        foreach ( (array) $activities as $i => $ac ) {
     618                                $activities[ $i ]->id                = (int) $ac->id;
     619                                $activities[ $i ]->item_id           = (int) $ac->item_id;
     620                                $activities[ $i ]->secondary_item_id = (int) $ac->secondary_item_id;
     621                                $activities[ $i ]->user_id           = (int) $ac->user_id;
     622                                $activities[ $i ]->hide_sitewide     = (int) $ac->hide_sitewide;
     623                                $activities[ $i ]->mptt_left         = (int) $ac->mptt_left;
     624                                $activities[ $i ]->mptt_right        = (int) $ac->mptt_right;
     625                                $activities[ $i ]->is_spam           = (int) $ac->is_spam;
     626                        }
     627
    616628                } else {
    617629                        // Query first for activity IDs.
    618630                        $activity_ids_sql = "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}, a.id {$sort}";