Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/20/2021 10:03:44 PM (3 years ago)
Author:
imath
Message:

Get the right user latest new_avatar activity before replacing it

In [13154] we missed setting the filter key of the array argument passed to the bp_activity_get() function.

See #8581

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/activity.php

    r13154 r13155  
    101101        $u = self::factory()->user->create();
    102102        $a = self::factory()->activity->create( array(
    103             'component' => 'members',
     103            'component' => buddypress()->members->id,
    104104            'type'      => 'new_avatar',
    105105            'user_id'   => $u,
     
    109109
    110110        $new_avatar_activities = bp_activity_get( array(
    111             'user_id'     => $u,
    112             'component'   => buddypress()->members->id,
    113             'type'        => 'new_avatar',
     111            'filter'    => array(
     112                'object'  => buddypress()->members->id,
     113                'user_id' => $u,
     114                'action'  => 'new_avatar',
     115            ),
    114116            'count_total' => 'count_query',
    115117        ) );
     
    129131
    130132        $a = self::factory()->activity->create( array(
    131             'component'     => 'members',
     133            'component'     => buddypress()->members->id,
    132134            'type'          => 'new_avatar',
    133135            'user_id'       => $u,
     
    138140
    139141        $new_avatar_activities = bp_activity_get( array(
    140             'user_id'     => $u,
    141             'component'   => buddypress()->members->id,
    142             'type'        => 'new_avatar',
     142            'filter'    => array(
     143                'object'  => buddypress()->members->id,
     144                'user_id' => $u,
     145                'action'  => 'new_avatar',
     146            ),
    143147            'count_total' => 'count_query',
    144148        ) );
Note: See TracChangeset for help on using the changeset viewer.