Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/21/2021 08:10:55 PM (3 years ago)
Author:
imath
Message:

The new_avatar activity belongs to the Members component

The activity generated when members add/update their profile photo wasn't migrated to the Members component during the 6.0.0 milestone. This commit's goal is to repare this oversight.

See #8156
See #8407
Fixes #8408

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-update.php

    r12617 r12851  
    274274            bp_update_to_5_0();
    275275        }
     276
     277        // Version 8.0.0.
     278        if ( $raw_db_version < 12850 ) {
     279            bp_update_to_8_0();
     280        }
    276281    }
    277282
     
    591596
    592597/**
     598 * 8.0.0 update routine.
     599 *
     600 * - Edit the `new_avatar` activity type's component to `members`.
     601 *
     602 * @since 8.0.0
     603 */
     604function bp_update_to_8_0() {
     605    global $wpdb;
     606    $bp_prefix = bp_core_get_table_prefix();
     607
     608    // Update the `new_avatar` activity type's component to `members`.
     609    $wpdb->update(
     610        $bp_prefix . 'bp_activity',
     611        array(
     612            'component' => 'members',
     613        ),
     614        array(
     615            'type' => 'new_avatar',
     616        ),
     617        array(
     618            '%s',
     619        ),
     620        array(
     621            '%s',
     622        )
     623    );
     624}
     625
     626/**
    593627 * Updates the component field for new_members type.
    594628 *
Note: See TracChangeset for help on using the changeset viewer.