Skip to:
Content

BuddyPress.org

Ticket #8642: 8642.alt.patch

File 8642.alt.patch, 823 bytes (added by imath, 3 years ago)
  • src/bp-notifications/bp-notifications-cache.php

    diff --git src/bp-notifications/bp-notifications-cache.php src/bp-notifications/bp-notifications-cache.php
    index 38abcfdc3..c56d70963 100644
    function bp_notifications_clear_all_for_user_cache_before_update( $update_args, 
    104104
    105105                // Get the list of user IDs from notification IDs.
    106106        } elseif ( isset( $where_args['ids'] ) && $where_args['ids'] ) {
    107                 $ids = (array) $where_args['ids'];
     107                $ids    = (array) $where_args['ids'];
     108                $is_new = 1;
     109
     110                if ( isset( $update_args['data']['is_new'] ) && 1 === $update_args['data']['is_new'] ) {
     111                        $is_new = 0;
     112                }
    108113
    109114                $ns = BP_Notifications_Notification::get(
    110115                        array(
    111                                 'id' => $ids,
     116                                'id'      => $ids,
     117                                'is_new'  => $is_new,
    112118                        )
    113119                );
    114120