Skip to:
Content

Ticket #7349: 7349.ray.03.patch

File 7349.ray.03.patch, 1.4 KB (added by r-a-y, 14 months ago)
  • src/bp-messages/bp-messages-actions.php

     
    222222        $thread_id = (int) bp_action_variable( 0 );
    223223
    224224        if ( ! messages_is_valid_thread( $thread_id ) || ( ! messages_check_thread_access( $thread_id ) && ! bp_current_user_can( 'bp_moderate' ) ) ) {
    225                 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) );
     225                return;
    226226        }
    227227
    228228        // Check if a new reply has been submitted.
  • src/bp-messages/bp-messages-screens.php

     
    120120
    121121        $thread_id = (int) bp_action_variable( 0 );
    122122
    123         if ( empty( $thread_id ) || ! messages_is_valid_thread( $thread_id ) || ( ! messages_check_thread_access( $thread_id ) && ! bp_current_user_can( 'bp_moderate' ) ) ) {
     123        if ( empty( $thread_id ) || ! messages_is_valid_thread( $thread_id ) ) {
    124124                bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) );
    125125        }
    126126
     127        if ( ! messages_check_thread_access( $thread_id ) && ! bp_current_user_can( 'bp_moderate' ) ) {
     128                bp_core_no_access();
     129                return;
     130        }
     131
    127132        // Load up BuddyPress one time.
    128133        $bp = buddypress();
    129134