Ticket #7349: 7349.ray.03.patch
File 7349.ray.03.patch, 1.4 KB (added by , 8 years ago) |
---|
-
src/bp-messages/bp-messages-actions.php
222 222 $thread_id = (int) bp_action_variable( 0 ); 223 223 224 224 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; 226 226 } 227 227 228 228 // Check if a new reply has been submitted. -
src/bp-messages/bp-messages-screens.php
120 120 121 121 $thread_id = (int) bp_action_variable( 0 ); 122 122 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 ) ) { 124 124 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) ); 125 125 } 126 126 127 if ( ! messages_check_thread_access( $thread_id ) && ! bp_current_user_can( 'bp_moderate' ) ) { 128 bp_core_no_access(); 129 return; 130 } 131 127 132 // Load up BuddyPress one time. 128 133 $bp = buddypress(); 129 134