Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2013 05:20:46 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Introduce bp_core_mark_notifications_by_type() and bp_core_mark_notifications_by_item_id() and replace bp_core_delete_notifications_by_type() and bp_core_delete_notifications_by_item_id() usages.

Ensures notifications are toggled as acknowledged rather than deleted. See #5148.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-functions.php

    r7110 r7530  
    9090
    9191        // Remove the friend request notice
    92         bp_core_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
     92        bp_core_mark_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
    9393
    9494        // Add a friend accepted notice for the initiating user
     
    134134
    135135    if ( !$friendship->is_confirmed && BP_Friends_Friendship::reject( $friendship_id ) ) {
     136
    136137        // Remove the friend request notice
    137         bp_core_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
     138        bp_core_mark_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
    138139
    139140        do_action_ref_array( 'friends_friendship_rejected', array( $friendship_id, &$friendship ) );
Note: See TracChangeset for help on using the changeset viewer.