Skip to:
Content

bbPress.org

Changeset 3503


Ignore:
Timestamp:
09/10/2011 07:29:32 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Fix issue where BuddyPress activity stream items could still be created for non-public forums when using sub-forums. Fixes #1630.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-extend-buddypress.php

    r3502 r3503  
    437437        $forum_id = bbp_get_forum_id( $forum_id );
    438438
     439        // Bail if user is not active
     440        if ( bbp_is_user_inactive( $user_id ) )
     441            return;
     442
     443        // Bail if topic is not published
     444        if ( !bbp_is_topic_published( $topic_id ) )
     445            return;
     446
    439447        // Bail if forum is not public
    440         if ( !bbp_is_forum_public( $forum_id ) )
     448        if ( !bbp_is_forum_public( $forum_id, false ) )
    441449            return;
    442450
     
    523531        $forum_id = bbp_get_forum_id( $forum_id );
    524532
     533        // Bail if user is not active
     534        if ( bbp_is_user_inactive( $user_id ) )
     535            return;
     536
    525537        // Bail if forum is not public
    526         if ( !bbp_is_forum_public( $forum_id ) )
     538        if ( !bbp_is_forum_public( $forum_id, false ) )
    527539            return;
    528540
Note: See TracChangeset for help on using the changeset viewer.