Ticket #2540: disable_auto_join_constant.patch
| File disable_auto_join_constant.patch, 3.1 KB (added by , 16 years ago) |
|---|
-
bp-themes/bp-default/groups/single/forum/topic.php
83 83 <div id="post-topic-reply"> 84 84 <p id="post-reply"></p> 85 85 86 <?php if ( !bp_group_is_member() ) : ?>86 <?php if ( !bp_group_is_member() && !BP_DISABLE_AUTO_GROUP_JOIN ) : ?> 87 87 <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?></p> 88 88 <?php endif; ?> 89 89 -
bp-themes/bp-default/groups/single/forum.php
25 25 26 26 <?php do_action( 'bp_before_group_forum_post_new' ) ?> 27 27 28 <?php if ( !bp_group_is_member() ) : ?>28 <?php if ( !bp_group_is_member() && !BP_DISABLE_AUTO_GROUP_JOIN ) : ?> 29 29 <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ) ?></p> 30 30 <?php endif; ?> 31 31 -
bp-groups.php
6 6 if ( !defined( 'BP_GROUPS_SLUG' ) ) 7 7 define ( 'BP_GROUPS_SLUG', 'groups' ); 8 8 9 if ( !defined( 'BP_DISABLE_AUTO_GROUP_JOIN' ) ) 10 define ( 'BP_DISABLE_AUTO_GROUP_JOIN', false ); 11 9 12 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-classes.php' ); 10 13 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-templatetags.php' ); 11 14 require ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-widgets.php' ); … … 364 367 check_admin_referer( 'bp_forums_new_reply' ); 365 368 366 369 /* Auto join this user if they are not yet a member of this group */ 367 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )370 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) && !BP_DISABLE_AUTO_GROUP_JOIN ) 368 371 groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id ); 369 372 370 373 if ( !$post_id = groups_new_group_forum_post( $_POST['reply_text'], $topic_id, $_GET['topic_page'] ) ) … … 542 545 check_admin_referer( 'bp_forums_new_topic' ); 543 546 544 547 /* Auto join this user if they are not yet a member of this group */ 545 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )548 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) && !BP_DISABLE_AUTO_GROUP_JOIN ) 546 549 groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id ); 547 550 548 551 if ( !$topic = groups_new_group_forum_topic( $_POST['topic_title'], $_POST['topic_text'], $_POST['topic_tags'], $forum_id ) )