Making WordPress.org

Ticket #2590: 2590.diff

File 2590.diff, 1.4 KB (added by ocean90, 9 years ago)
  • trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php

     
    505505                        $post = get_post( $topic_id );
    506506                }
    507507
    508                 if ( $user_id && $post && ( user_can( $user_id, 'moderate' ) || $user_id == $post->post_author ) ) {
     508                if ( $user_id && $post && ( user_can( $user_id, 'moderate', $topic_id ) || $user_id == $post->post_author ) ) {
    509509                        $retval = true;
    510510                } else {
    511511                        $retval = false;
  • trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php

     
    438438                        $user_id = bbp_get_reply_author_id();
    439439                }
    440440
    441                 return ( user_can( $user_id, 'moderate' ) || ( ! $strict && bbp_is_user_keymaster( $user_id ) ) );
     441                return ( user_can( $user_id, 'moderate', get_queried_object_id() ) || ( ! $strict && bbp_is_user_keymaster( $user_id ) ) );
    442442        }
    443443}