Changeset 11578 for trunk/src/bp-messages/bp-messages-actions.php
- Timestamp:
- 06/06/2017 05:46:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-actions.php
r11537 r11578 248 248 } 249 249 250 // Mark message read. 251 messages_mark_thread_read( $thread_id ); 250 /* 251 * Mark message read, but only run on the logged-in user's profile. 252 * If an admin visits a thread, it shouldn't change the read status. 253 */ 254 if ( bp_is_my_profile() ) { 255 messages_mark_thread_read( $thread_id ); 256 } 252 257 253 258 /** … … 320 325 321 326 // Check access to the message and mark as read. 322 if ( messages_check_thread_access( $id ) ) {327 if ( messages_check_thread_access( $id ) || bp_current_user_can( 'bp_moderate' ) ) { 323 328 messages_mark_thread_read( $id ); 324 329 bp_core_add_message( __( 'Message marked as read.', 'buddypress' ) ); … … 361 366 362 367 // Check access to the message and mark unread. 363 if ( messages_check_thread_access( $id ) ) {368 if ( messages_check_thread_access( $id ) || bp_current_user_can( 'bp_moderate' ) ) { 364 369 messages_mark_thread_unread( $id ); 365 370 bp_core_add_message( __( 'Message marked unread.', 'buddypress' ) ); … … 405 410 // Make sure the user has access to all notifications before managing them. 406 411 foreach ( $messages as $message ) { 407 if ( ! messages_check_thread_access( $message ) ) {412 if ( ! messages_check_thread_access( $message ) && ! bp_current_user_can( 'bp_moderate' ) ) { 408 413 bp_core_add_message( __( 'There was a problem managing your messages.', 'buddypress' ), 'error' ); 409 414 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' );
Note: See TracChangeset
for help on using the changeset viewer.