Ticket #7907: 7907.01.patch
| File 7907.01.patch, 2.1 KB (added by , 8 years ago) |
|---|
-
src/bp-activity/bp-activity-notifications.php
55 55 $text = sprintf( __( 'You have %1$d new replies', 'buddypress' ), (int) $total_items ); 56 56 $amount = 'multiple'; 57 57 } else { 58 $link = add_query_arg( ' nid', (int) $id, bp_activity_get_permalink( $activity_id ) );58 $link = add_query_arg( 'rid', (int) $id, bp_activity_get_permalink( $activity_id ) ); 59 59 $text = sprintf( __( '%1$s commented on one of your updates', 'buddypress' ), $user_fullname ); 60 60 } 61 61 break; … … 70 70 $text = sprintf( __( 'You have %1$d new comment replies', 'buddypress' ), (int) $total_items ); 71 71 $amount = 'multiple'; 72 72 } else { 73 $link = add_query_arg( ' nid', (int) $id, bp_activity_get_permalink( $activity_id ) );74 $text = sprintf( __( '%1$s replied to one your activity comments', 'buddypress' ), $user_fullname );73 $link = add_query_arg( 'crid', (int) $id, bp_activity_get_permalink( $activity_id ) ); 74 $text = sprintf( __( '%1$s replied to one of your activity comments', 'buddypress' ), $user_fullname ); 75 75 } 76 76 break; 77 77 } … … 239 239 240 240 // Mark as read any notifications for the current user related to this activity item. 241 241 bp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), $activity->id, buddypress()->activity->id, 'new_at_mention' ); 242 243 // For replies to a parent update. 244 if ( ! empty( $_GET['rid'] ) ) { 245 BP_Notifications_Notification::update( 246 array( 247 'is_new' => false 248 ), 249 array( 250 'user_id' => bp_loggedin_user_id(), 251 'id' => (int) $_GET['rid'], 252 ) 253 ); 254 } 255 256 // For replies to an activity comment. 257 if ( ! empty( $_GET['crid'] ) ) { 258 BP_Notifications_Notification::update( 259 array( 260 'is_new' => false 261 ), 262 array( 263 'user_id' => bp_loggedin_user_id(), 264 'id' => (int) $_GET['crid'], 265 ) 266 ); 267 } 242 268 } 243 269 add_action( 'bp_activity_screen_single_activity_permalink', 'bp_activity_remove_screen_notifications_single_activity_permalink' ); 244 270